Coder Social home page Coder Social logo

Comments (8)

Kern046 avatar Kern046 commented on August 24, 2024 1

In case you want to use heavy artillery.... :)

http://bl.ocks.org/robschmuecker/raw/7880033/

from rbac.

abiusx avatar abiusx commented on August 24, 2024

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.

battis avatar battis commented on August 24, 2024

I found that this code snippet and a recursive traversal of the tree work decently well… for a smallish tree.

from rbac.

abiusx avatar abiusx commented on August 24, 2024

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.

tchalvak avatar tchalvak commented on August 24, 2024

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.

abiusx avatar abiusx commented on August 24, 2024

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.

tchalvak avatar tchalvak commented on August 24, 2024

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.

abiusx avatar abiusx commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.