-
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
check the existence of a path #113
Comments
As far as I remember it will return false. It should be easy to test though.
A non-existent child is not a child of anyone.
Paths are simply translated to hierarchies before being tested.
… On Dec 3, 2018, at 3:56 AM, P-A ***@***.***> wrote:
I would like to know, if I create a path on permissions and after I do a check on this path with a false child permissions that does not exist, will it return me an error or will it return to me the parent role (that I have)?
example:
"office / desk / computer" the computer does not exist.
If I check "office / desk / computer "will return true if I have 'office/desk' ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#113>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjWwyHJFtXCXyokpDZX-9BYjPIABC7ks5u1Oc3gaJpZM4Y-IdJ>.
|
yes, but wouldn't it be interesting to have this kind of possibility? |
It shouldn't be hard to implement something like that.
Instead of checking from child to root, you can check root to child.
…-A
On Dec 3, 2018, at 9:10 AM, P-A ***@***.***> wrote:
yes, but wouldn't it be interesting to have this kind of possibility?
If you check a path and the last argument of this path doesn't exist, but the parent permission does
that the exception is not thrown.
It may only interest me, but I would like to share with you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#113 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW265FYPtweRhOGpclI-OmIEde0r4ks5u1TDPgaJpZM4Y-IdJ>.
|
I totally agree. |
As far as I remember, currently the path to ID conversion is done using some
magical optimized MySQL query, which uses group_concat to make only one query to find
the parent and all the children. That's why it needs to be exact.
If you change that into a series of queries that retrieve the hierarchy, you can easily add
leniency. You can also try to work this into that magic query somehow!
… On Dec 3, 2018, at 9:18 AM, P-A ***@***.***> wrote:
I totally agree.
I'll try to do that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#113 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjWy-48zUGR2GOTrpfWoCOpCSgcmTLks5u1TKZgaJpZM4Y-IdJ>.
|
Thank you |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to know, if I create a path on permissions and after I do a check on this path with a false child permissions that does not exist, will it return me an error or will it return to me the parent role (that I have)?
example:
"office / desk / computer" the computer does not exist.
If I check "office / desk / computer "will return true if I have 'office/desk' ?
The text was updated successfully, but these errors were encountered: