add casbin rbac

This commit is contained in:
landaiqing
2024-08-23 11:36:41 +08:00
parent e0f0c4c466
commit 014abca8f8
17 changed files with 210 additions and 11 deletions

14
config/rbac_model.pml Normal file
View File

@@ -0,0 +1,14 @@
[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[role_definition]
g = _, _
[policy_effect]
e = some(where (p.eft == allow)) && !some(where (p.eft == deny))
[matchers]
m = g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act