fix(个人信息): 新旧密码不能相同
--bug=1007829 --user=郭雨琦 [个人信息]-修改密码-新密码和旧密码相同仍提交成功,应提示密码相同
This commit is contained in:
parent
3d1b86ebb8
commit
48bc7dd6b5
|
@ -526,7 +526,7 @@ public class UserService {
|
|||
String newPassword = request.getNewpassword();
|
||||
String newPasswordMd5 = CodingUtil.md5(newPassword);
|
||||
if(StringUtils.equals(oldPassword,newPasswordMd5)){
|
||||
MSException.throwException(Translator.get("新修改的密码不能与旧密码一样 "));
|
||||
return null;
|
||||
}
|
||||
UserExample userExample = new UserExample();
|
||||
userExample.createCriteria().andIdEqualTo(SessionUtils.getUser().getId()).andPasswordEqualTo(oldPassword);
|
||||
|
|
|
@ -67,8 +67,12 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.result = this.$post(this.updatePasswordPath, this.ruleForm, response => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
logout();
|
||||
if(!response.data){
|
||||
this.$error(this.$t('commons.personal_password_info'));
|
||||
}else {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
logout();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -80,6 +80,7 @@ export default {
|
|||
show: 'Show',
|
||||
report: 'Report',
|
||||
user: 'User',
|
||||
personal_password_info:'Same old and new password',
|
||||
system: 'System',
|
||||
personal_setting: 'Personal Setting',
|
||||
api_keys: 'API Keys',
|
||||
|
|
|
@ -86,6 +86,7 @@ export default {
|
|||
user: '用户',
|
||||
system: '系统',
|
||||
personal_setting: '个人设置',
|
||||
personal_password_info:'新旧密码相同',
|
||||
test_resource_pool: '测试资源池',
|
||||
system_setting: '系统设置',
|
||||
api: '接口测试',
|
||||
|
|
|
@ -86,6 +86,7 @@ export default {
|
|||
user: '用戶',
|
||||
system: '系統',
|
||||
personal_setting: '個人設置',
|
||||
personal_password_info:'新舊密碼相同',
|
||||
test_resource_pool: '測試資源池',
|
||||
system_setting: '系統設置',
|
||||
api: '接口測試',
|
||||
|
|
Loading…
Reference in New Issue