Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
Signed-off-by: WashingtonKK <[email protected]>
  • Loading branch information
WashingtonKK committed Apr 22, 2024
1 parent 84929db commit 09bd9ba
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions auth/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,21 +759,21 @@ func (svc service) UnassignUsers(ctx context.Context, token, id string, userIds
}
}

for _, rel := range []string{MemberRelation, ViewerRelation, EditorRelation} {
// Remove only non-admins.
if err := svc.removeDomainPolicies(ctx, id, rel, ids...); err != nil {
return errors.Wrap(errRemovePolicies, err)
}
}
for _, rel := range []string{MemberRelation, ViewerRelation, EditorRelation} {
// Remove only non-admins.
if err := svc.removeDomainPolicies(ctx, id, rel, ids...); err != nil {
return errors.Wrap(errRemovePolicies, err)
}
}
}

// If user is admin, remove all policies from all users.
for _, rel := range []string{MemberRelation, ViewerRelation, EditorRelation} {
// Remove only non-admins.
if err := svc.removeDomainPolicies(ctx, id, rel, userIds...); err != nil {
return errors.Wrap(errRemovePolicies, err)
}
}
for _, rel := range []string{MemberRelation, ViewerRelation, EditorRelation} {
// Remove only non-admins.
if err := svc.removeDomainPolicies(ctx, id, rel, userIds...); err != nil {
return errors.Wrap(errRemovePolicies, err)
}
}

return nil
}
Expand Down

0 comments on commit 09bd9ba

Please sign in to comment.