Skip to content

Commit

Permalink
NET-647: Allow Role Update of OAuth User (#2609)
Browse files Browse the repository at this point in the history
* allow update of oauth user role

* allow update of role for an oauth user
  • Loading branch information
abhishek9686 authored Oct 4, 2023
1 parent 3f12117 commit 7a83110
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,8 @@ func updateUser(w http.ResponseWriter, r *http.Request) {
}
}

if auth.IsOauthUser(user) == nil {
err := fmt.Errorf("cannot update user info for oauth user %s", username)
logger.Log(0, err.Error())
if auth.IsOauthUser(user) == nil && userchange.Password != "" {
err := fmt.Errorf("cannot update user's password for an oauth user %s", username)
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "forbidden"))
return
}
Expand Down

0 comments on commit 7a83110

Please sign in to comment.