Skip to content

Commit

Permalink
Allow a user to remove their own role from a project (#3716)
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov authored Jun 26, 2024
1 parent 6efa146 commit 6cc166f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions internal/controlplane/handlers_authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,6 @@ func (s *Server) RemoveRole(ctx context.Context, req *minder.RemoveRoleRequest)
entityCtx := engcontext.EntityFromContext(ctx)
targetProject := entityCtx.Project.ID

// Ensure user is not updating their own role
err := isUserSelfUpdating(ctx, sub, email)
if err != nil {
return nil, err
}

// Parse role (this also validates)
authzRole, err := authz.ParseRole(role)
if err != nil {
Expand Down

0 comments on commit 6cc166f

Please sign in to comment.