User: support setting org and help flags though update function (#86535)
* User: Support setting active org through update function * User: add support to update help flags through update function
This commit is contained in:
@@ -39,7 +39,7 @@ type User struct {
|
||||
Company string
|
||||
EmailVerified bool
|
||||
Theme string
|
||||
HelpFlags1 HelpFlags1
|
||||
HelpFlags1 HelpFlags1 `xorm:"help_flags1"`
|
||||
IsDisabled bool
|
||||
|
||||
IsAdmin bool
|
||||
@@ -86,9 +86,13 @@ type UpdateUserCommand struct {
|
||||
IsDisabled *bool `json:"-"`
|
||||
EmailVerified *bool `json:"-"`
|
||||
IsGrafanaAdmin *bool `json:"-"`
|
||||
|
||||
Password *Password `json:"-"`
|
||||
// If password is included it will be validated, hashed and updated for user.
|
||||
Password *Password `json:"-"`
|
||||
// If old password is included it will be validated against users current password.
|
||||
OldPassword *Password `json:"-"`
|
||||
// If OrgID is included update current org for user
|
||||
OrgID *int64 `json:"-"`
|
||||
HelpFlags1 *HelpFlags1 `json:"-"`
|
||||
}
|
||||
|
||||
type UpdateUserLastSeenAtCommand struct {
|
||||
@@ -96,11 +100,6 @@ type UpdateUserLastSeenAtCommand struct {
|
||||
OrgID int64
|
||||
}
|
||||
|
||||
type SetUsingOrgCommand struct {
|
||||
UserID int64
|
||||
OrgID int64
|
||||
}
|
||||
|
||||
type SearchUsersQuery struct {
|
||||
SignedInUser identity.Requester
|
||||
OrgID int64 `xorm:"org_id"`
|
||||
@@ -179,11 +178,6 @@ type BatchDisableUsersCommand struct {
|
||||
IsDisabled bool
|
||||
}
|
||||
|
||||
type SetUserHelpFlagCommand struct {
|
||||
HelpFlags1 HelpFlags1
|
||||
UserID int64 `xorm:"user_id"`
|
||||
}
|
||||
|
||||
type GetSignedInUserQuery struct {
|
||||
UserID int64 `xorm:"user_id"`
|
||||
Login string
|
||||
|
||||
Reference in New Issue
Block a user