1

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?

Neka
  • 1,574
  • 4
  • 22
  • 36

1 Answers1

4

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

Kris Wallsmith
  • 8,945
  • 1
  • 37
  • 25