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

fix: permission to casbin policy mapping #1275

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented Jan 17, 2025

The condition on the policy shouldn't be using double quotes.

Add .AsMap() to RBACAttribute.
When RBACAttribute object was directly passed to casbin, it returned the following error

Unable to access unexported field 'playbook' in 'r_obj'

This happend despite the fact that the struct and the fields were exported and also the fields had json tags.

@adityathebe adityathebe force-pushed the fix/permission-to-casbin branch from a27ffb6 to 4f558de Compare January 17, 2025 14:49
@adityathebe adityathebe merged commit 6ca8ce2 into main Jan 17, 2025
7 checks passed
@adityathebe adityathebe deleted the fix/permission-to-casbin branch January 17, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant