Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
张凯
3 years ago
Commit
ec221ac0332504da5986ac6c15ccca05bc82565a
1 parent
d913fb1e
1、杭州-重置密码优化(去除最近5次密码验证及增加4-20位验证)
2、杭州-用户修改密码优化(没有设置等级时,增加4-20位验证)
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
12 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/userIndex.js
hg-monitor-web-base/src/main/resources/static/src/views/template/user/password.html
hg-monitor-web-base/src/main/resources/static/src/controller/userIndex.js
View file @
ec221ac
...
...
@@ -853,16 +853,25 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
},
yes
:
function
(
index
,
layero
)
{
var
password
=
$
(
'#userReSetPwd'
).
val
();
var
flag
=
false
;
//验证密码等级是否满足
var
flag
=
new
RegExp
(
pattern
).
test
(
password
);
if
(
!
flag
){
$
(
'.deptTips'
).
html
(
patternTips
.
replace
(
'密码格式为:'
,
''
));
return
;
}
if
(
checkHas
(
passwords
,
password
)){
$
(
'.deptTips'
).
html
(
'不能使用最近5次密码'
);
return
;
if
(
pattern
!=
''
){
flag
=
new
RegExp
(
pattern
).
test
(
password
);
if
(
!
flag
){
$
(
'.deptTips'
).
html
(
patternTips
.
replace
(
'密码格式为:'
,
''
));
return
;
}
}
else
{
if
(
password
.
trim
().
length
<
4
||
password
.
trim
().
length
>
20
){
$
(
'.deptTips'
).
html
(
'密码必须为4-20位!'
);
return
;
}
}
//管理员重置密码,不用做最近5次验证
// if (checkHas(passwords,password)){
// $('.deptTips').html('不能使用最近5次密码');
// return;
// }
resetPwd
(
id
,
password
);
}
});
...
...
hg-monitor-web-base/src/main/resources/static/src/views/template/user/password.html
View file @
ec221ac
...
...
@@ -73,16 +73,22 @@
form
.
verify
((
function
(
pattern
,
patternTips
,
last5His
)
{
return
{
pass
:
function
(
value
)
{
if
(
value
===
''
){
if
(
value
.
trim
()
===
''
){
return
'必填项不能位空'
;
}
if
(
value
===
$
(
'#oldPassword'
).
val
()){
if
(
value
.
trim
()
===
$
(
'#oldPassword'
).
val
()){
return
'新密码不能与旧密码一致'
;
}
if
(
pattern
&&
!
new
RegExp
(
pattern
).
test
(
value
)){
if
(
pattern
&&
!
new
RegExp
(
pattern
).
test
(
value
.
trim
()
)){
return
patternTips
;
}
if
(
!
pattern
||
pattern
==
undefined
){
if
(
value
.
trim
().
length
<
4
||
value
.
trim
().
length
>
20
){
return
'新密码必须4-20位!'
;
}
}
//临时增加用户组写死密码 joke add 20210508
if
(
last5His
&&
last5His
.
length
>
0
&&
checkHas
(
last5His
,
value
)){
return
'不能使用最近5次密码'
;
...
...
@@ -186,7 +192,7 @@
var
last5His
=
passwords
;
verifyForm
(
pattern
,
patternTips
,
last5His
);
}
else
{
layer
.
msg
(
'没有获取去密码级别,将不做密码级别验证!'
,
{
icon
:
0
}
);
console
.
log
(
'没有获取去密码级别,将不做密码级别验证!'
);
verifyForm
(
undefined
,
undefined
,
passwords
);
}
}
...
...
Please
register
or
login
to post a comment