fix: fix policies
This commit is contained in:
parent
46dbfe77bc
commit
1ccc5d1141
|
@ -25,9 +25,7 @@ func GetCasbin(logger *zap.Logger) *casbin.Enforcer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add policies after creating the enforcer
|
// Add policies after creating the enforcer
|
||||||
_ = a.AddPolicy("admin", "/admin", []string{"GET"})
|
_ = a.AddPolicy("p", "p", []string{"admin", "/admin*", "(GET|POST|DELETE)"})
|
||||||
_ = a.AddPolicy("admin", "/admin", []string{"POST"})
|
|
||||||
_ = a.AddPolicy("admin", "/admin", []string{"DELETE"})
|
|
||||||
|
|
||||||
err = e.LoadPolicy()
|
err = e.LoadPolicy()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue