I use the casbin with rabc with resource model, this is my conf:
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[role_definition]
g = _, _
g2 = _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub) && g2(r.obj, p.obj) &&(r.act == p.act
this is the policy:
p, data_group_admin, data_group, write
g, alice, data_group_admin
g2, /api/:id, data_group
this is the request:
alice, /api/1, read
alice, /api/2, write
the result is false, false actually, I expect the result is true, true,I want to the resource can support restful format, how to set the conf?