1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 23:11:01 +00:00

Add an authorization plugin that supports ACL, RBAC based on casbin. It requires the built-in HTTP basic authentication by default.

This commit is contained in:
Yang Luo
2017-05-04 14:02:21 +08:00
parent 83814a76cc
commit b2e7720fcd
5 changed files with 216 additions and 0 deletions

View File

@ -0,0 +1,14 @@
[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) && (r.act == p.act || p.act == "*")