mirror of https://gitee.com/answerdev/answer.git
feat(plugin): Return whether to set password status at login
This commit is contained in:
parent
19108b2124
commit
91f5f3290c
|
@ -70,6 +70,8 @@ type GetUserResp struct {
|
|||
IsAdmin bool `json:"is_admin"`
|
||||
// user status
|
||||
Status string `json:"status"`
|
||||
// user have password
|
||||
HavePassword bool `json:"have_password"`
|
||||
}
|
||||
|
||||
func (r *GetUserResp) GetFromUserEntity(userInfo *entity.User) {
|
||||
|
@ -81,6 +83,7 @@ func (r *GetUserResp) GetFromUserEntity(userInfo *entity.User) {
|
|||
if ok {
|
||||
r.Status = statusShow
|
||||
}
|
||||
r.HavePassword = len(userInfo.Pass) > 0
|
||||
}
|
||||
|
||||
type GetUserToSetShowResp struct {
|
||||
|
|
Loading…
Reference in New Issue