Comments (8)
In case you want to use heavy artillery.... :)
http://bl.ocks.org/robschmuecker/raw/7880033/
from rbac.
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.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com
On Jun 6, 2014, at 4:10 AM, joostshao [email protected] wrote:
hi,how to get my all roles or permissions and to make a tree just like the demo page ?
—
Reply to this email directly or view it on GitHub.
from rbac.
I found that this code snippet and a recursive traversal of the tree work decently well… for a smallish tree.
from rbac.
that is very interesting… @JBurns should be able to use it to create our GUI too!
On Dec 27, 2014, at 1:59 AM, Seth Battis [email protected] wrote:
I found that this code snippet http://thecodeplayer.com/walkthrough/css3-family-tree and a recursive traversal of the tree https://github.com/cottonwoodgulch/gulchdb/blob/master/reset_rbac.php#L7 work decently well… for a smallish tree.
—
Reply to this email directly or view it on GitHub #47 (comment).
from rbac.
The tutorial here:
http://phprbac.net/docs_contents.php
Leaves out some really important functionality like this, e.g.
How do I get all the roles of a user?
How do I get all the permissions 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.
from rbac.
It is specifically not mentioned in the tutorial.
Roles of a user should not be used in decision making within the application. Unless RBAC management is the goal, accessing roles of a user should not ever happen in the application,
the app should just check whether a permission is available for a user or not, and roles are there to mask the complicated assignments.
On Oct 13, 2016, at 5:42 PM, Roy R. [email protected] wrote:
The tutorial here:
http://phprbac.net/docs_contents.php http://phprbac.net/docs_contents.php
Leaves out some really important functionality like this, e.g.How do I get all the roles of a user?
How do I get all the permissions 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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub #47 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABVjWytvlxUnekaRLvnHgLuVwpkpL4Crks5qzqXSgaJpZM4CBvTk.
from rbac.
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 manager
& customer_service
and floor_manager
! But I don't need to do anything if he already has all those roles assigned!
Conversely, if Jane just got demoted, I want to audit her security & permissions, and remove as appropriate.
What is the solution there?
from rbac.
I see what you mean. As I said, it is available in the RBAC management part.
I'm not sure if we have one as part of the official package, but there have been a few implemented by people using the lib, and one back in the old days by myself.
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.
-A
On Oct 13, 2016, at 9:11 PM, Roy R. [email protected] wrote:
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 whether bob has role manager... ...because I want to make him a manager! I don't need to do anything if he already has the manager role.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub #47 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABVjWwnvuPlWWk-Lok-8DWPdcXtAkKZmks5qztbAgaJpZM4CBvTk.
from rbac.
Related Issues (20)
- The result of Rbac->Users->hasRole() is incorrect. HOT 1
- How Can I generate Graph Hierarchy? HOT 1
- How to add Rule (such as Author Rule) to an permission HOT 8
- How to move a {Entity} to other parent? HOT 4
- a role can have multiple children but only one direct parent HOT 2
- roles->remove() recursive not clean the relationship with Permission and User with its descendants
- Roles->permissions() & Permissions->roles() only return its directly related permissions and roles HOT 2
- Children() method run slowly HOT 15
- check the existence of a path HOT 6
- PhpRbac.net is down HOT 1
- Retrieve list of roles and permissions stored HOT 2
- Support PHP-Casbin as the authorization backend to provide ACL, RBAC, ABAC at the same time HOT 2
- php_rbac library HOT 1
- How does it work? HOT 13
- SQL server HOT 3
- PhpRbac.net is down. HOT 1
- Library Viability HOT 1
- Edit Roles and Permissions Depth? HOT 1
- Can't find table or something like that? HOT 3
- Roles->children is giving blank array HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbac.