Providing an easy way to work with the Symfony Security Acl.

v1.1.0 2015-09-10 21:28 UTC


Bundle for Symfony2 providing easy access to the complex ACL subsystem

Latest Stable Version Total Downloads License Build Status Coverage Status SensioLabsInsight


This Symfony 2 Bundle provides an easy api to the Security/ACL component and an eventlistener for automatic ACL cleanup upon removal of domain objects. The installation is simple and by default does not change any behavior of your application.

Without this bundle you normally do this (taken from the ACL docs):

// creating the ACL
$aclProvider = $container->get('security.acl.provider');
$objectIdentity = ObjectIdentity::fromDomainObject($domainObject);
$acl = $aclProvider->createAcl($objectIdentity);

// retrieving the security identity of the currently logged-in user
$tokenStorage = $container->get('security.token_storage');
$user = $tokenStorage->getToken()->getUser();
$securityIdentity = UserSecurityIdentity::fromAccount($user);

// grant owner access
$acl->insertObjectAce($securityIdentity, MaskBuilder::MASK_OWNER);

With this bundle you can simplify it to:

$tokenStorage = $container->get('security.token_storage');
$user = $tokenStorage->getToken()->getUser();

$aclManager = $container->get('projecta_acl.manager');
    ->grant($domainObject, MaskBuilder::MASK_OWNER, $user);


The latest documentation can be found on


To run the test suite, you need composer.

$ composer install
$ phpunit


ChiliLabs AclBundle is licensed under the MIT license.