Hi, I wanted to implement an authentication system with users, roles, resources and actions. While i found documentation for this i couldn't find any documentation regarding how one action can inherit another like write can also read and manage can write and read. is there a way to implement this? can anyone help?
[request_definition]
r = sub, obj, act
[policy_definition]
p = role, obj, act
p2 = act, act # Action inheritance (e.g., write > read)
[role_definition]
g = _, _ # User to role assignment
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.role) && (p(r.obj, r.act) || p2(r.act, p2.act) && p(r.obj, p2.obj))
My idea is something like this
