权限管理接口实现
This commit is contained in:
@@ -69,7 +69,8 @@ func (a *AuthCtx) checkScopes(scopes ...string) bool {
|
||||
return true
|
||||
}
|
||||
if len(a.smap) == 0 && len(a.Scopes) > 0 {
|
||||
for _, scope := range scopes {
|
||||
a.smap = make(map[string]struct{}, len(a.Scopes))
|
||||
for _, scope := range a.Scopes {
|
||||
a.smap[scope] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user