8000 fix: duplicate policy type when calling CasbinJsGetPermissionForUser by egor-spk · Pull Request #773 · casbin/casbin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: duplicate policy type when calling CasbinJsGetPermissionForUser #773

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 25, 2021

Conversation

egor-spk
Copy link
Contributor

If you call CasbinJsGetPermissionForUser more than once, the policies are corrupted. Each run duplicate ptype. That is, after the second launch, the policy looks like this:

p, p, alice, data1, read

@egor-spk egor-spk changed the title fix duplicate policy type fix: duplicate policy type when calling CasbinJsGetPermissionForUser Apr 25, 2021
@hsluoyz hsluoyz requested review from kilosonc and hsluoyz April 25, 2021 14:58
Copy link
Member
@hsluoyz hsluoyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plz fix:

image

@egor-spk egor-spk force-pushed the CasbinJsGetPermissionForUser branch from ba11494 to 193927f Compare April 25, 2021 15:42
Signed-off-by: Egor Kuzmin <egor.spk@gmail.com>
@egor-spk egor-spk force-pushed the CasbinJsGetPermissionForUser branch from 193927f to f09f6f1 Compare April 25, 2021 15:45
@egor-spk
Copy link
Contributor Author

@hsluoyz, ready!

@hsluoyz hsluoyz merged commit ab6b8e7 into casbin:master Apr 25, 2021
@github-actions
Copy link

🎉 This PR is included in version 2.28.4 🎉

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.

3 participants
0