snapshot of https://github.com/casbin/casbin.git (master, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
20
examples/rbac_with_constraints_model.conf
Normal file
20
examples/rbac_with_constraints_model.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
[request_definition]
|
||||
r = sub, obj, act
|
||||
|
||||
[policy_definition]
|
||||
p = sub, obj, act
|
||||
|
||||
[role_definition]
|
||||
g = _, _
|
||||
|
||||
[constraint_definition]
|
||||
c = sod("finance_requester", "finance_approver")
|
||||
c2 = sodMax(["payroll_view", "payroll_edit", "payroll_approve"], 1)
|
||||
c3 = roleMax("superadmin", 2)
|
||||
c4 = rolePre("db_admin", "security_trained")
|
||||
|
||||
[policy_effect]
|
||||
e = some(where (p.eft == allow))
|
||||
|
||||
[matchers]
|
||||
m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act
|
||||
Reference in New Issue
Block a user