Neka
Neka

Reputation: 1664

How to make advanced ACL in Symfony2?

I need roles and privileges editing like it is in Drupal (creating as more roles as need, editing privileges in web-browser and each module can add its own privileges to common list), because it very flexibly and handy.

How can i implement same thing in Symfony2? Is there some bundles aimed for this? Or i need make my own from scratch?

Upvotes: 1

Views: 1258

Answers (1)

Kris Wallsmith
Kris Wallsmith

Reputation: 8965

You can use FOSUserBundle for this. It includes optional support for creating groups which are assigned roles. Then you can assign a user to a group and he will inherit all of those roles. If you edit the roles assigned to a group, your changes will cascade to all users who belong to that group.

Documentation for using groups is here: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/groups.md

Upvotes: 4

Related Questions