hotgo/server/manifest/config/casbin.conf
2022-11-24 23:37:34 +08:00

15 lines
286 B
Go

[request_definition]
r = sub, obj, act
[policy_definition]
p = sub, obj, act
[role_definition]
g = _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
# 支持通配符匹配路由和请求方式
m = g(r.sub, p.sub) && keyMatch(r.obj, p.obj) && regexMatch(r.act, p.act)