mirror of
https://github.com/grafana/grafana.git
synced 2025-01-08 15:13:30 -06:00
IAM: Fix logic for enabling a user (#90309)
fix: correct logic on enabling a disabled user account
This commit is contained in:
parent
4abb4d1662
commit
7e767e40a9
@ -334,7 +334,7 @@ func (hs *HTTPServer) AdminEnableUser(c *contextmodel.ReqContext) response.Respo
|
||||
return response.Error(http.StatusInternalServerError, "Could not enable external user", nil)
|
||||
}
|
||||
|
||||
isDisabled := true
|
||||
isDisabled := false
|
||||
if err := hs.userService.Update(c.Req.Context(), &user.UpdateUserCommand{UserID: userID, IsDisabled: &isDisabled}); err != nil {
|
||||
if errors.Is(err, user.ErrUserNotFound) {
|
||||
return response.Error(http.StatusNotFound, user.ErrUserNotFound.Error(), nil)
|
||||
|
Loading…
Reference in New Issue
Block a user