forked from baron/baron-sso
린트 적용
This commit is contained in:
@@ -67,13 +67,19 @@ func (s *tenantService) ListManageableTenants(ctx context.Context, userID string
|
||||
// Fallback: Check direct membership if list objects didn't catch everything
|
||||
directAdminIDs, _ := s.keto.ListObjects(ctx, "Tenant", "admins", "User:"+userID)
|
||||
directOwnerIDs, _ := s.keto.ListObjects(ctx, "Tenant", "owners", "User:"+userID)
|
||||
|
||||
|
||||
idMap := make(map[string]bool)
|
||||
for _, id := range directAdminIDs { idMap[id] = true }
|
||||
for _, id := range directOwnerIDs { idMap[id] = true }
|
||||
|
||||
for _, id := range directAdminIDs {
|
||||
idMap[id] = true
|
||||
}
|
||||
for _, id := range directOwnerIDs {
|
||||
idMap[id] = true
|
||||
}
|
||||
|
||||
allIDs = make([]string, 0, len(idMap))
|
||||
for id := range idMap { allIDs = append(allIDs, id) }
|
||||
for id := range idMap {
|
||||
allIDs = append(allIDs, id)
|
||||
}
|
||||
}
|
||||
|
||||
if len(allIDs) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user