-
This commit is contained in:
@ -460,14 +460,14 @@ func (m *MockPermissionRepository) ValidatePermissionScopes(ctx context.Context,
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
|
||||
var invalid []string
|
||||
var valid []string
|
||||
for _, scope := range scopes {
|
||||
if _, exists := m.scopeIndex[scope]; !exists {
|
||||
invalid = append(invalid, scope)
|
||||
if _, exists := m.scopeIndex[scope]; exists {
|
||||
valid = append(valid, scope)
|
||||
}
|
||||
}
|
||||
|
||||
return invalid, nil
|
||||
return valid, nil
|
||||
}
|
||||
|
||||
func (m *MockPermissionRepository) GetPermissionHierarchy(ctx context.Context, scopes []string) ([]*domain.AvailablePermission, error) {
|
||||
|
||||
Reference in New Issue
Block a user