class SuperUserAccessPolicyPass
Same name in other branches
- 11.x core/lib/Drupal/Core/DependencyInjection/Compiler/SuperUserAccessPolicyPass.php \Drupal\Core\DependencyInjection\Compiler\SuperUserAccessPolicyPass
Removes the super user access policy when toggled off.
Hierarchy
- class \Drupal\Core\DependencyInjection\Compiler\SuperUserAccessPolicyPass implements \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Expanded class hierarchy of SuperUserAccessPolicyPass
1 file declares its use of SuperUserAccessPolicyPass
- CoreServiceProvider.php in core/
lib/ Drupal/ Core/ CoreServiceProvider.php
File
-
core/
lib/ Drupal/ Core/ DependencyInjection/ Compiler/ SuperUserAccessPolicyPass.php, line 11
Namespace
Drupal\Core\DependencyInjection\CompilerView source
class SuperUserAccessPolicyPass implements CompilerPassInterface {
/**
* {@inheritdoc}
*/
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');
}
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.