Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCasbinKey 建议默认的 e.casbins["*"]逻辑去掉 #547

Open
Qiufcong opened this issue Aug 26, 2021 · 0 comments
Open

GetCasbinKey 建议默认的 e.casbins["*"]逻辑去掉 #547

Qiufcong opened this issue Aug 26, 2021 · 0 comments
Labels

Comments

@Qiufcong
Copy link

// GetCasbinKey 根据key获取casbin
func (e *Application) GetCasbinKey(key string) casbin.SyncedEnforcer {
e.mux.Lock()
defer e.mux.Unlock()
if e, ok := e.casbins["
"]; ok {
return e
}
return e.casbins[key]
}

建议这个方法把默认e.casbins["*"]去掉,因为我开发的场景用 可能还需要定制另外的xx_casbin_rule,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant