Hi, there is some change applied in 1.2.0 which is preventing the following code and rules to run as they were in 1.1.3
The policy was working fine in 1.1.3. I believe it has something to do with "g2", add_named_matching_func and fm functions
code:
enforcer = casbin.Enforcer("./rbac.conf", "./policy.csv")
enforcer.add_named_matching_func("g2", enforcer.fm.fm["globMatch"])
rbac.conf:
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, role
[role_definition]
g = _, _
g2 = _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g2(r.act, p.role) && (g(r.sub, p.sub) || p.sub=='*') && keyMatch(r.obj, p.obj)
policy.csv
p, root, *, owner
g, root@localhost, root
g2, *.*, owner
expected:
root@localhost, /, org.create -> PASS (get a FAIL in 1.2.0)
Hi, there is some change applied in 1.2.0 which is preventing the following code and rules to run as they were in 1.1.3
The policy was working fine in 1.1.3. I believe it has something to do with "g2", add_named_matching_func and fm functions
code:
rbac.conf:
policy.csv
expected:
root@localhost, /, org.create-> PASS (get a FAIL in 1.2.0)