Reputation: 499
I use symfony2 and also I integrated FOSUserBundle. But, I see that user's roles are stored in an array. I want to add more types user's roles, and for every user it will correspond only a user role type.
For example for this problem I found this solution:
1) Create a table 'user_roles', where it can be find all user role types.
2) Between 'user' tabel and 'user_roles' tabel, it will exist a relation created by the 'role' field.
How can I do that using FOSUserBundle given that the 'user' tabel from FOSUserBundle has a 'role' field that keep an array of roles types.
Upvotes: 0
Views: 301
Reputation: 1931
Role management in FOSUserBundle is the same as Symfony. You can read the documentation here.
You define your roles in your security.yml in a hierarchical way.
Upvotes: 3