We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Want to prioritize this issue? Try:
when I set matchingForGFunction: 'keyMatch' on casbin online editor, it works. but when i set it as the following locally
enforcer.AddNamedDomainMatchingFunc("g", "", util.KeyMatch) enforcer.AddNamedMatchingFunc("g", "", util.KeyMatch)
i always get 'false'. How can i deal with it?
model:
[request_definition] r = sub, dom, obj, act [policy_definition] p = sub, dom, obj, act [role_definition] g = _, _, _ [policy_effect] e = some(where (p.eft == allow)) [matchers] m = g(r.sub, p.sub, r.dom) && keyMatch(r.dom == p.dom) && r.obj == p.obj && r.act == p.act
policy:
p, admin, *, data1, read p, admin, *, data1, write g, alice, admin, domain1
request(s):
alice, domain1, data1, write ---> false (expected: true)
code
func main() { enforcer, _ := casbin.NewEnforcer("./model.conf", "./policy.csv") enforcer.AddNamedDomainMatchingFunc("g", "", util.KeyMatch) enforcer.AddNamedMatchingFunc("g", "", util.KeyMatch) ok, _ := enforcer.Enforce("alice", "domian1", "data1", "write") fmt.Println("alice write data1", ok) }
The text was updated successfully, but these errors were encountered:
@tangyang9464 @closetool @sagilio
Sorry, something went wrong.
hsluoyz
No branches or pull requests
Want to prioritize this issue? Try:
when I set matchingForGFunction: 'keyMatch' on casbin online editor, it works.
but when i set it as the following locally
i always get 'false'. How can i deal with it?
model:
policy:
request(s):
code
The text was updated successfully, but these errors were encountered: