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

[Bug] RBAC Pattern not working with Conditions #1393

Open
MuZhou233 opened this issue May 15, 2024 · 1 comment
Open

[Bug] RBAC Pattern not working with Conditions #1393

MuZhou233 opened this issue May 15, 2024 · 1 comment

Comments

@MuZhou233
Copy link
Contributor

Describe the bug
We can define a policy with pattern or with condition. They both work as documentation describes.
But their conbination won't work.
This may caused by inproper/missing logic somewhere in ConditionalDomainManager.

To Reproduce

  1. Initialize an RBAC model with conditions and pattern
p, admin, domain, data, read
g, alice, admin, *, _, _
  1. Execute enforcer
e.AddNamedDomainMatchingFunc("g", "keyMatch", util.KeyMatch)
e.Enforce("alice", "domain", "data", "read")
  1. Get false

Expected behavior
Result should be true

Additional context
Relate #1354

@casbin-bot
Copy link
Member

@tangyang9464 @JalinWang

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

No branches or pull requests

3 participants