kekrozsak/vendor/jms/security-extra-bundle/JMS/SecurityExtraBundle/DependencyInjection/Compiler/IntegrationPass.php

22 lines
731 B
PHP
Raw Normal View History

<?php
namespace JMS\SecurityExtraBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
class IntegrationPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
if (!$container->hasAlias('security.acl.provider')
&& !$container->hasDefinition('security.acl.provider')) {
$container->removeDefinition('security.acl.permission_evaluator');
}
if ($container->hasDefinition('security.role_hierarchy')) {
$container->getDefinition('security.role_hierarchy')
->setPublic(true);
}
}
}