I have been experimenting with the RBAC Authorization in Yii, and have come across a few questions that I can not find an answer to!
So here goes…
-
Is it possible to make groups of roles so that a user can only have one role in a group?
-
To clarify lets say we have two "sets" of roles (document_roles: reader, editor) and (project_roles: administrator, normal_user)
-
Any user can have at most 1 role from document_roles and 1 from project_roles
-
So a user could be administrator and reader.
-
No user should be allowed to be both reader and editor nor administrator and normal_user
-
-
Can I assign the same role multiple times but with dependencies to a context, and how?
-
Again to clarify, lets say we have many projects and a given user could be given a role with regards to any of these.
-
Eg. user A could be assigned as Admin for Project1 and as User for Project2
-
Any help will be appreciated!
/Jeppe S. Sørensen