mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-24 03:29:05 +08:00
15 lines
286 B
Go
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)
|