Skip to content

Commit 8ad644a

Browse files
author
奇淼(piexlmax
authored
Merge pull request flipped-aurora#483 from flipped-aurora/revert-482-gva_gormv2_dev
Revert "Gva gormv2 dev"
2 parents 40f995b + 86cfebb commit 8ad644a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

server/service/sys_casbin.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@ func ClearCasbin(v int, p ...string) bool {
9191
//@return: *casbin.Enforcer
9292

9393
var (
94-
e *casbin.Enforcer
95-
once sync.Once
96-
eLock sync.Mutex
94+
e *casbin.Enforcer
95+
once sync.Once
9796
)
9897

9998
func Casbin() *casbin.Enforcer {
@@ -102,9 +101,7 @@ func Casbin() *casbin.Enforcer {
102101
e, _ = casbin.NewEnforcer(global.GVA_CONFIG.Casbin.ModelPath, a)
103102
e.AddFunction("ParamsMatch", ParamsMatchFunc)
104103
})
105-
eLock.Lock()
106104
_ = e.LoadPolicy()
107-
eLock.Unlock()
108105
return e
109106
}
110107

0 commit comments

Comments
 (0)