-
|
Hi guys, I'd want to use casbin to modelize my very simple RBAC policy. [request_definition]
r = sub, perm
[policy_definition]
p = sub, perm
[role_definition]
g = _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub) && r.perm == p.permPermissions can be assigned to roles. Roles can inherit other roles. And here is a policy example : p, alice, read_object
p, bob, write_object
p, object_admin, read_object
p, object_admin, write_object
g, tom, object_adminSo I can easily get all permissions for user tom by using the GetImplicitPermissionsForUser method. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
@FredVi the new GetImplicitUsersForPermission() API has be added, see here: #1233 |
Beta Was this translation helpful? Give feedback.
@FredVi the new GetImplicitUsersForPermission() API has be added, see here: #1233