管理员默认密码 admin/admin,首次登录强制改密码;增加服务器部署配置
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -100,6 +100,11 @@ func (d *Deps) AdminPatchUser(w http.ResponseWriter, r *http.Request) {
|
||||
writeErr(w, statusForErr(err), err.Error())
|
||||
return
|
||||
}
|
||||
// 管理员重置密码后,强制用户下次登录改密
|
||||
if err := d.Auth.SetForcePasswordChange(id, true); err != nil {
|
||||
writeErr(w, statusForErr(err), err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
if req.Disabled != nil {
|
||||
// 禁止禁用自己,避免管理员锁死自己
|
||||
|
||||
Reference in New Issue
Block a user