This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Multiple roles given in context #258
Comments
I think this problem is currently impossible to solve with ZfcRbac, but I see two ways:
|
Off topic : could we use labels to be able to filter issues ? |
Hi, might the following 2 solutions work? Solution 1 involves passing the project name as $context to getRoles() while the more complicated Solution 2 involves prepending the project name to roles and permissions. First of all, let's assume 4 tables in the database: role, user, project, map_project_user.
Solution 1
Solution 2
|
zionsg
added a commit
to zionsg/zfc-rbac
that referenced
this issue
Jun 5, 2015
This allows the identity to return different roles for different contexts. A scenario would be a user having different roles for different projects and the project name is passed in as the context. Implements Solution 1 in ZF-Commons#258 (comment)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi everyone,
Just a question to know how you guys/girls would solve this problem (I'd like to add that to the cookbook, eventually).
Imagine a project where each user has a given role (most of the time, "member"). In this system, users can create project where they have a bunch of permissions related to their project (like "project.create", "project.delete", "project.add_foo").
Now, you have the ability to invite other users to this project. Those users are users of the system, so they are also member, and they also have the "project.create", "project.delete"... permissions). But when I invite a user, I could give him a specific role for this project, so that he is read-only for instance, only on this project.
How would you tackle this problem?
ping @arekkas @danizord
The text was updated successfully, but these errors were encountered: