*
This commit is contained in:
@@ -37,7 +37,7 @@ postgresql:
|
||||
max-open-conns: 10
|
||||
|
||||
casbin:
|
||||
model-path: "./resource/rbac_model.conf"
|
||||
model-path: "./rbac_model.conf"
|
||||
|
||||
gen:
|
||||
# 代码生成读取的数据库名称
|
||||
|
||||
11
res/rbac_model.conf
Normal file
11
res/rbac_model.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
[request_definition]
|
||||
r = sub, obj, act
|
||||
|
||||
[policy_definition]
|
||||
p = sub, obj, act
|
||||
|
||||
[policy_effect]
|
||||
e = some(where (p.eft == allow))
|
||||
|
||||
[matchers]
|
||||
m = r.sub == p.sub && (keyMatch2(r.obj, p.obj) || keyMatch(r.obj, p.obj)) && ( r.act == p.act || p.act == '*')
|
||||
Reference in New Issue
Block a user