function authorize_access_allowed

Same name and namespace in other branches
  1. 7.x authorize.php \authorize_access_allowed()
  2. 9 core/authorize.php \authorize_access_allowed()
  3. 8.9.x core/authorize.php \authorize_access_allowed()
  4. 10 core/authorize.php \authorize_access_allowed()

Determines if the current user is allowed to run authorize.php.

The kill switch in settings.php overrides all else, otherwise, the user must have access to the 'administer software updates' permission.


\Symfony\Component\HttpFoundation\Request $request: The incoming request.

Return value

bool TRUE if the current user can run authorize.php, and FALSE if not.

1 call to authorize_access_allowed()
authorize.php in core/authorize.php
Administrative script for running authorized file operations.


core/authorize.php, line 59


function authorize_access_allowed(Request $request) {
    $account = \Drupal::service('authentication')->authenticate($request);
    if ($account) {
    return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates');

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.