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
|
||||
_ = a.AddPolicy("admin", "/admin", []string{"GET"})
|
||||
_ = a.AddPolicy("admin", "/admin", []string{"POST"})
|
||||
_ = a.AddPolicy("admin", "/admin", []string{"DELETE"})
|
||||
_ = a.AddPolicy("p", "p", []string{"admin", "/admin*", "(GET|POST|DELETE)"})
|
||||
|
||||
err = e.LoadPolicy()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue