Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Laurel Lee
O2OA
Commits
a31b60eb
Commit
a31b60eb
authored
3 years ago
by
o2sword
Browse files
Options
Download
Email Patches
Plain Diff
passwordPeriod为0时任何情况密码都不过期
parent
a4fd3d7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Person.java
+1
-1
.../src/main/java/com/x/base/core/project/config/Person.java
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/authentication/BaseAction.java
+2
-2
...emble/authentication/jaxrs/authentication/BaseAction.java
with
3 additions
and
3 deletions
+3
-3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Person.java
+
1
-
1
View file @
a31b60eb
...
...
@@ -92,7 +92,7 @@ public class Person extends ConfigObject {
@FieldDescribe
(
"注册初始密码,使用()调用脚本生成初始密码,默认为:"
+
DEFAULT_PASSWORD
)
private
String
password
;
@FieldDescribe
(
"密码过期时间(天),0表示不过期
(只对新用户有效),-1表示永不过期(对所有用户有效)
,默认值:0."
)
@FieldDescribe
(
"密码过期时间(天),0表示
永
不过期,默认值:0."
)
private
Integer
passwordPeriod
;
@FieldDescribe
(
"密码校验正则表达式,默认6位以上,包含数字和字母."
)
...
...
This diff is collapsed.
Click to expand it.
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/jaxrs/authentication/BaseAction.java
+
2
-
2
View file @
a31b60eb
...
...
@@ -196,14 +196,14 @@ abstract class BaseAction extends StandardJaxrsAction {
private
void
passwordExpired
(
AbstractWoAuthentication
wo
)
throws
Exception
{
wo
.
setPasswordExpired
(
false
);
Integer
passwordPeriod
=
Config
.
person
().
getPasswordPeriod
();
if
(
passwordPeriod
!=
null
&&
passwordPeriod
<
0
){
if
(
passwordPeriod
.
intValue
()
==
0
){
return
;
}
if
(
null
!=
wo
.
getPasswordExpiredTime
())
{
if
(
wo
.
getPasswordExpiredTime
().
getTime
()
<
(
new
Date
()).
getTime
())
{
wo
.
setPasswordExpired
(
true
);
}
}
else
if
(
passwordPeriod
!=
null
&&
passwordPeriod
>
0
&&
wo
.
getChangePasswordTime
()!=
null
){
}
else
if
(
wo
.
getChangePasswordTime
()!=
null
){
Date
date
=
DateTools
.
addDay
(
wo
.
getChangePasswordTime
(),
passwordPeriod
);
if
(
date
.
getTime
()
<
(
new
Date
()).
getTime
())
{
wo
.
setPasswordExpired
(
true
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment