Skip to content
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

feat: fix undefined reason in ABAC enforceEx result in Node.js engine #196

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

HashCookie
Copy link
Contributor

fix: #193

Reason:

  • In the ABAC model, the reason in the return value of enforceEx may be undefined.
  • Not handling this situation will lead to a type mismatch error.

Resolve

  • Return an empty array [] when reason is undefined.

Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for casbin-editor ready!

Name Link
🔨 Latest commit e2e8fd3
🔍 Latest deploy log https://app.netlify.com/sites/casbin-editor/deploys/67812a0534e284000880bcfb
😎 Deploy Preview https://deploy-preview-196--casbin-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hsluoyz hsluoyz changed the title fix: handle undefined reason in ABAC enforceEx result feat: fix undefined reason in ABAC enforceEx result in Node.js engine Jan 10, 2025
@hsluoyz hsluoyz merged commit 582a8f3 into casbin:master Jan 10, 2025
8 of 10 checks passed
@hsluoyz
Copy link
Member

hsluoyz commented Jan 10, 2025

🎉 This PR is included in version 1.39.0 🎉

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] editor should fix the ABAC model error: Cannot read properties of undefined (reading 'some')
2 participants