function SuperUserAccessPolicyPass::process
Same name in other branches
- 11.x core/lib/Drupal/Core/DependencyInjection/Compiler/SuperUserAccessPolicyPass.php \Drupal\Core\DependencyInjection\Compiler\SuperUserAccessPolicyPass::process()
File
-
core/
lib/ Drupal/ Core/ DependencyInjection/ Compiler/ SuperUserAccessPolicyPass.php, line 16
Class
- SuperUserAccessPolicyPass
- Removes the super user access policy when toggled off.
Namespace
Drupal\Core\DependencyInjection\CompilerCode
public function process(ContainerBuilder $container) : void {
if ($container->getParameter('security.enable_super_user') === FALSE) {
$container->removeDefinition('access_policy.super_user');
$container->removeAlias('Drupal\\Core\\Session\\SuperUserAccessPolicy');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.