kekrozsak/vendor/jms/security-extra-bundle/JMS/SecurityExtraBundle/DependencyInjection/Compiler/IntegrationPass.php
Polonkai Gergely 082a0130c2 Initial commit with Symfony 2.1+Vendors
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
2012-07-01 09:52:20 +02:00

22 lines
731 B
PHP

<?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);
}
}
}