Skip to content

Commit e03f0cc

Browse files
author
pixel
committed
修复map竞争问题
1 parent f603ebb commit e03f0cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/service/sys_casbin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ func Casbin() *casbin.Enforcer {
101101
a, _ := gormadapter.NewAdapterByDB(global.GVA_DB)
102102
e, _ = casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
103103
e.AddFunction("ParamsMatch", ParamsMatchFunc)
104+
_ = e.LoadPolicy()
104105
})
105-
eLock.Lock()
106-
_ = e.LoadPolicy()
107-
eLock.Unlock()
108106
return e
109107
}
110108

0 commit comments

Comments
 (0)