authorize_access_allowed(Request$request)
Determines if the current user is allowed to run authorize.php.
The killswitch 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.
bool TRUE if the current user can run authorize.php, and FALSE if not.
function authorize_access_allowed(Request $request) { $account = \Drupal::service('authentication')->authenticate($request); if ($account) { \Drupal::currentUser()->setAccount($account); } return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!authorize.php/function/authorize_access_allowed/8.1.x