Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2: Storing users, roles, role hierarchy, and access controls in database

I've been working with Symfony (2.x) for the first time and I had some questions regarding the definition of roles, role hierarchy, and how they can be assigned to individual users.

I was interested in storing the roles and role hierarchy in a database (rather than security.yml); however, I cannot find any documentation supporting this. Is this advisable?

I was interested in having an admin module that can add new roles and define role hierarchies; however, having the admin module modify security.yml or some other config file seems like a bad idea.

This obviously would require that the ACLs can be stored in a database as well.

  • Does anyone have any tips or documentation that might help with this?
  • Is it a bad idea, performance wise?

I've been successful implementing this with Zend Framework in the past and was hoping to do the same with Symfony2.

like image 842
zeitgeist Avatar asked Nov 18 '11 06:11

zeitgeist


1 Answers

Perhaps you might want to have a look at FOSUserBundle

like image 196
mcandril Avatar answered Oct 10 '22 12:10

mcandril