权限管理接口实现

This commit is contained in:
2026-03-18 18:09:32 +08:00
parent 9d996acf5f
commit bb895eccdf
44 changed files with 1958 additions and 161 deletions

View File

@@ -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{}{}
}
}