fix: update def's
This commit is contained in:
parent
e40111a276
commit
46dbfe77bc
|
@ -13,8 +13,9 @@ func GetCasbin(logger *zap.Logger) *casbin.Enforcer {
|
||||||
m := model.NewModel()
|
m := model.NewModel()
|
||||||
m.AddDef("r", "r", "sub, obj, act")
|
m.AddDef("r", "r", "sub, obj, act")
|
||||||
m.AddDef("p", "p", "sub, obj, act")
|
m.AddDef("p", "p", "sub, obj, act")
|
||||||
|
m.AddDef("g", "g", "_, _")
|
||||||
m.AddDef("e", "e", "some(where (p.eft == allow))")
|
m.AddDef("e", "e", "some(where (p.eft == allow))")
|
||||||
m.AddDef("m", "m", "r.sub == p.sub && keyMatch2(r.obj, p.obj) && r.act == p.act")
|
m.AddDef("m", "m", "g(r.sub, p.sub) && r.obj == p.obj && r.act == p.act")
|
||||||
|
|
||||||
a := NewPolicyAdapter(logger)
|
a := NewPolicyAdapter(logger)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue