We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b897db commit 8136599Copy full SHA for 8136599
config/casbin-model.conf
@@ -1,11 +1,14 @@
1
[request_definition]
2
-r = http_method, http_path
+r = user_or_role_id, http_method, http_path
3
4
[policy_definition]
5
-p = http_method, http_path
+p = user_or_role_id, http_method, http_path
6
+
7
+[role_definition]
8
+g = _, _
9
10
[policy_effect]
11
e = some(where (p.eft == allow))
12
13
[matchers]
-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