8000 fix: enforcer action changed after calling `LoadPolicy`(#748) by kilosonc · Pull Request #749 · casbin/casbin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: enforcer action changed after calling LoadPolicy(#748) #749

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

Merged
merged 1 commit into from
Apr 3, 2021
Merged

fix: enforcer action changed after calling LoadPolicy(#748) #749

merged 1 commit into from
Apr 3, 2021

Conversation

kilosonc
Copy link
Contributor
@kilosonc kilosonc commented Apr 3, 2021

Signed-off-by: closetool c299999999@qq.com

fix: #748

Signed-off-by: closetool <c299999999@qq.com>
@kilosonc
Copy link
Contributor Author
kilosonc commented Apr 3, 2021

@hsluoyz @giefferre plz reiview

@hsluoyz
Copy link
Member
hsluoyz commented Apr 3, 2021

@closetool can you explain what caused this bug and why made such change?

@kilosonc
Copy link
Contributor Author
kilosonc commented Apr 3, 2021

@hsluoyz sure
In previous code, calling LoadPolicy resulted in replacement of rolemanger, DomainMatchingFunc and MatchingFunc will be deleted too, so we have to reset matching function.
Now, I just call the Clear method, and matching function will be reversed.

@hsluoyz
Copy link
Member
hsluoyz commented Apr 3, 2021

@closetool great, just as I expected in: #748 (comment)

@hsluoyz hsluoyz merged commit 3040d51 into casbin:master Apr 3, 2021
@github-actions
Copy link
github-actions bot commented Apr 3, 2021

🎉 This PR is included in version 2.25.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Unable to Enforce policies after LoadPolicy
2 participants
0