-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi,how to get my all roles or permissions and to make a tree just like the demo page ? #47
Comments
you can get all roles or all permissions (there are functions for it) that give them as an array sorted by depth. But then you need to use a tree-view widget to show them. In the demo page, we have manually created that tree. It is a part of our next phase to have a GUI tool to manage the trees, but for now you have to do it yourself. Notice: This message is digitally signed, its source and integrity are verifiable. On Jun 6, 2014, at 4:10 AM, joostshao notifications@github.com wrote:
|
I found that this code snippet and a recursive traversal of the tree work decently well… for a smallish tree. |
that is very interesting… @JBurns should be able to use it to create our GUI too!
|
In case you want to use heavy artillery.... :) |
The tutorial here: Leaves out some really important functionality like this, e.g. How do I get all the roles of a user? The first question is available in the api docs, so it would be good to link from the tutorial to there to show that there are more methods than just those mentioned in the tutorial. |
It is specifically not mentioned in the tutorial.
|
While it's true that roles should play no part in business logic, when viewing a user's account, knowing which roles they have, and listing which permissions they have in total, is quite necessary. Even at a basic level, I need to know which roles bob has... ...because I want to make him a Conversely, if Jane just got demoted, I want to audit her security & permissions, and remove as appropriate. What is the solution there? |
I see what you mean. As I said, it is available in the RBAC management part. Listing all permissions of a user might not be feasible. a root user has all the permissions. listing their high-level permissions or just listing their roles should make more sense.
|
hi,how to get my all roles or permissions and to make a tree just like the demo page ?
The text was updated successfully, but these errors were encountered: