Skip to content

Commit 8136599

Browse files
authored
Update casbin-model.conf
1 parent 4b897db commit 8136599

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

config/casbin-model.conf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
[request_definition]
2-
r = http_method, http_path
2+
r = user_or_role_id, http_method, http_path
33

44
[policy_definition]
5-
p = http_method, http_path
5+
p = user_or_role_id, http_method, http_path
6+
7+
[role_definition]
8+
g = _, _
69

710
[policy_effect]
811
e = some(where (p.eft == allow))
912

1013
[matchers]
11-
m = (r.http_method == p.http_method || p.http_method == 'ALL') && keyMatch(r.http_path, p.http_path)
14+
m = g(r.user_or_role_id, p.user_or_role_id) && (r.http_method == p.http_method || p.http_method == 'ALL')

0 commit comments

Comments
 (0)