feat: support resetting password on first login (#2980)

* feat: support reset password in first login

* feat: disable needUpdatePassword when user haven't email and phone and mfa
This commit is contained in:
DacongDA
2024-06-02 01:00:55 +08:00
committed by GitHub
parent 7d05b69aac
commit e5f9aab28f
35 changed files with 149 additions and 36 deletions

View File

@ -411,6 +411,10 @@ func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang str
item := GetAccountItemByName("Is deleted", organization)
itemsChanged = append(itemsChanged, item)
}
if oldUser.NeedUpdatePassword != newUser.NeedUpdatePassword {
item := GetAccountItemByName("Need update password", organization)
itemsChanged = append(itemsChanged, item)
}
if oldUser.Score != newUser.Score {
item := GetAccountItemByName("Score", organization)