-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
circular link will make getImplicitRolesForUser stackoverflow #150
Comments
I suggest switching to casbin golang's implementation |
@GopherJ The have same implementation in golang. So I try to do a fix in casbin/casbin#452. |
@nodece I think we should fix first: Line 288 in 0e3c49c
* -> book_admin -> * . In casbin-rs it crashed and I fixed it in: casbin/casbin-rs#131
casbin/casbin-rs@1aa11d6#diff-94f22c9d3dc2cf7a1c731fa147d2dbb2R247-R260 circular link in pattern we can solve it later because the importance is not to crash |
fixed in #155 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mode.conf
patten matching func:
error: e.getImplicitRolesForUser("alice") will cause stackoverflow
What's happening
Step1: Since we have pattern matching function and
alice
match*
, then when wecreateRole
alice
will add*
in her role list. While callinge.getImplicitRolesForUser("alice")
.The first loop, we will get alice's direct role list:
Step2: Then we call
e.getImplicitRolesForUser("*")
, and in its first iteration we get the following role list:Step3: Then we call
e.getImplicitRolesForUser("book_admin")
ande.getImplicitRolesForUser("pen_admin")
, it foundsbook_admin
matches*
then it returns also*
and the next call will return to our step1.The text was updated successfully, but these errors were encountered: