diff --git a/server/service/sys_casbin.go b/server/service/sys_casbin.go index 6e72c5ff..6e28a7f2 100644 --- a/server/service/sys_casbin.go +++ b/server/service/sys_casbin.go @@ -100,8 +100,8 @@ func Casbin() *casbin.Enforcer { a, _ := gormadapter.NewAdapterByDB(global.GVA_DB) e, _ = casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a) e.AddFunction("ParamsMatch", ParamsMatchFunc) + _ = e.LoadPolicy() }) - _ = e.LoadPolicy() return e }