User: use update function for password updates (#86419)
* Update password through Update function instead * Remove duplicated to lower * Refactor password code
This commit is contained in:
@@ -86,13 +86,9 @@ type UpdateUserCommand struct {
|
||||
IsDisabled *bool `json:"-"`
|
||||
EmailVerified *bool `json:"-"`
|
||||
IsGrafanaAdmin *bool `json:"-"`
|
||||
}
|
||||
|
||||
type ChangeUserPasswordCommand struct {
|
||||
OldPassword Password `json:"oldPassword"`
|
||||
NewPassword Password `json:"newPassword"`
|
||||
|
||||
UserID int64 `json:"-"`
|
||||
Password *Password `json:"-"`
|
||||
OldPassword *Password `json:"-"`
|
||||
}
|
||||
|
||||
type UpdateUserLastSeenAtCommand struct {
|
||||
@@ -296,3 +292,8 @@ type AdminCreateUserResponse struct {
|
||||
ID int64 `json:"id"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type ChangeUserPasswordCommand struct {
|
||||
OldPassword Password `json:"oldPassword"`
|
||||
NewPassword Password `json:"newPassword"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user