This commit is contained in:
2025-08-22 14:40:59 -04:00
parent 98a299e7b2
commit 141b1e936d
12 changed files with 1973 additions and 61 deletions

View File

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