fix: fix policies

This commit is contained in:
Derrick Hammer 2024-01-15 23:46:54 -05:00
parent 46dbfe77bc
commit 1ccc5d1141
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 3 deletions

View File

@ -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 {