-
-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Want to prioritize this issue? Try:
Describe the bug
Same problem with casbin/casbin#1422 , Python Casbin does not support ** glob match.
To Reproduce
Steps to reproduce the behavior:
- Go to casbin online editor https://casbin.org/editor/
- Paste codes below:
Model
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[role_definition]
g = _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub) && globMatch(r.obj, p.obj) && globMatch(r.act, p.act)
Policy
p, alice, /**, *
Request
alice, /alice_data/hello, GET
Expected behavior
true Reason: ["alice","/**","*"]
true expected in enforcement result, as Node-Casbin does
switch to PyCasbin:
false
Meanwhile, rust casbin, c# casbin raises an exception.
// 🟢 dotnet Engine Result
// ========================
// ⚪️ node Engine Result
true Reason: ["alice","/**","*"]
// ----------------------------------------
// ⚪️ java Engine Result
true Reason: ["alice","/**","*"]
// ----------------------------------------
// ⚪️ go Engine Result
true Reason: ["alice","/**","*"]
// ----------------------------------------
// ⚪️ rust Engine Result
// ----------------------------------------
// ⚪️ python Engine Result
false
// ----------------------------------------
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows
- Browser: Edge
- Version 140.0.3485.81
Additional context
Versions in online editor
Node-Casbin (NodeJs)5.37.0
jCasbin (ava) v1.79.0|(CLl v1.17.0)
Casbin (Go) v2.116.0|(CLl v1.12.0)
Casbin-rs (Rust) v2.10.1|(CLl v1.3.0)
PyCasbin (Python) v1.17.0 |(CLl v1.0.0)
Casbin.NET (C#) v1.4.0.0|(CLI v1.0.0)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working