fix: 密码强制修改非首次登录校验去除日期判断,补充参数说明翻译信息
This commit is contained in:
@@ -931,3 +931,4 @@ dayLt: Days less than, default 30 days');
|
|||||||
INSERT INTO "sys_i18n" VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
INSERT INTO "sys_i18n" VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
||||||
INSERT INTO "sys_i18n" VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
INSERT INTO "sys_i18n" VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
||||||
INSERT INTO "sys_i18n" VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
INSERT INTO "sys_i18n" VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
||||||
|
INSERT INTO "sys_i18n" VALUES (759, "config.sys.user.fristPasswdChangeRemark", "关闭改为false 开启改为true, 建议同时设置密码有效期", "Off to false On to true, it is recommended to set the password expiration date at the same time.");
|
||||||
|
|||||||
@@ -930,3 +930,4 @@ dayLt: Days less than, default 30 days');
|
|||||||
REPLACE INTO "sys_i18n" VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
REPLACE INTO "sys_i18n" VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
||||||
REPLACE INTO "sys_i18n" VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
REPLACE INTO "sys_i18n" VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
||||||
REPLACE INTO "sys_i18n" VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
REPLACE INTO "sys_i18n" VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
||||||
|
REPLACE INTO "sys_i18n" VALUES (759, "config.sys.user.fristPasswdChangeRemark", "关闭改为false 开启改为true, 建议同时设置密码有效期", "Off to false On to true, it is recommended to set the password expiration date at the same time.");
|
||||||
|
|||||||
@@ -773,5 +773,6 @@ INSERT INTO `sys_i18n` VALUES (755, 'job.ne_alarm_state_check_license_remark', '
|
|||||||
INSERT INTO `sys_i18n` VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
INSERT INTO `sys_i18n` VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
||||||
INSERT INTO `sys_i18n` VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
INSERT INTO `sys_i18n` VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
||||||
INSERT INTO `sys_i18n` VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
INSERT INTO `sys_i18n` VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
||||||
|
INSERT INTO `sys_i18n` VALUES (759, "config.sys.user.fristPasswdChangeRemark", "关闭改为false 开启改为true, 建议同时设置密码有效期", "Off to false On to true, it is recommended to set the password expiration date at the same time.");
|
||||||
|
|
||||||
-- Dump completed on 2025-02-14 15:26:56
|
-- Dump completed on 2025-02-14 15:26:56
|
||||||
|
|||||||
@@ -770,5 +770,6 @@ REPLACE INTO `sys_i18n` VALUES (755, 'job.ne_alarm_state_check_license_remark',
|
|||||||
REPLACE INTO `sys_i18n` VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
REPLACE INTO `sys_i18n` VALUES (756, 'dictData.trace_interfaces.14', 'N14', 'N14');
|
||||||
REPLACE INTO `sys_i18n` VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
REPLACE INTO `sys_i18n` VALUES (757, 'dictData.trace_interfaces.5', 'N5', 'N5');
|
||||||
REPLACE INTO `sys_i18n` VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
REPLACE INTO `sys_i18n` VALUES (758, "alarm.export.alarmCode", "告警编码", "Alarm Code");
|
||||||
|
REPLACE INTO `sys_i18n` VALUES (759, "config.sys.user.fristPasswdChangeRemark", "关闭改为false 开启改为true, 建议同时设置密码有效期", "Off to false On to true, it is recommended to set the password expiration date at the same time.");
|
||||||
|
|
||||||
-- Dump completed on 2025-02-14 15:26:56
|
-- Dump completed on 2025-02-14 15:26:56
|
||||||
|
|||||||
@@ -290,17 +290,17 @@ func (s *SysProfileController) PasswordForce(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 首次登录
|
// // 首次登录
|
||||||
forcePasswdChange := userInfo.LoginCount <= 2
|
// forcePasswdChange := userInfo.LoginCount <= 2
|
||||||
// 非首次登录,判断密码是否过期
|
// // 非首次登录,判断密码是否过期
|
||||||
if !forcePasswdChange {
|
// if !forcePasswdChange {
|
||||||
alert, _ := s.sysUserService.ValidatePasswordExpireTime(userInfo.PasswordUpdateTime)
|
// alert, _ := s.sysUserService.ValidatePasswordExpireTime(userInfo.PasswordUpdateTime)
|
||||||
forcePasswdChange = alert
|
// forcePasswdChange = alert
|
||||||
}
|
// }
|
||||||
if !forcePasswdChange {
|
// if !forcePasswdChange {
|
||||||
c.JSON(403, resp.ErrMsg("not matching the amendment"))
|
// c.JSON(403, resp.ErrMsg("not matching the amendment"))
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 检查密码是否与历史密码一致
|
// 检查密码是否与历史密码一致
|
||||||
err = s.sysUserService.ValidatePasswordNotAllowedHistory(userInfo.UserId, body.Password)
|
err = s.sysUserService.ValidatePasswordNotAllowedHistory(userInfo.UserId, body.Password)
|
||||||
|
|||||||
Reference in New Issue
Block a user