[v11.1.x] Admin: Fixes an issue where user accounts could not be enabled (#90361)

Fix: unable to enable user
Co-authored-by: gonvee <gonvee@users.noreply.github.com>
This commit is contained in:
Ieva
2024-07-12 12:12:21 +02:00
committed by GitHub
co-authored by gonvee
parent 5c39ab885d
commit c5ea48aec9
+1 -1
View File
@@ -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)