Is Symfony 2 security hard to implement with RBAC? Is Symfony 2 security hard to implement with RBAC? symfony symfony

Is Symfony 2 security hard to implement with RBAC?


For simple role-based configuration You can start from looking into Voters and Hierarchical Roles. It's a rule of thumb, that You will hardly need Symfony ACLs - these are much more sophisticated than simple voters and only very special use-cases will exploit the full potential of Symfony ACLs.

As stated in Symfony voters page:

In Symfony, you can check the permission to access data by using the ACL module, which is a bit overwhelming for many applications. A much easier solution is to work with custom voters, which are like simple conditional statements.


If you need to go down to that level then the Security Bundle has ACLs that can be defined and used at any granularity http://symfony.com/doc/current/cookbook/security/acl.html