caishunfeng commented on code in PR #10437:
URL: https://github.com/apache/dolphinscheduler/pull/10437#discussion_r897493168
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -413,10 +414,15 @@ public Map<String, Object> updateUser(User loginUser, int
userId,
}
if (StringUtils.isNotEmpty(userPassword)) {
Review Comment:
remove the outer not empty validate
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -413,10 +414,15 @@ public Map<String, Object> updateUser(User loginUser, int
userId,
}
if (StringUtils.isNotEmpty(userPassword)) {
- if (!CheckUtils.checkPassword(userPassword)) {
+
+ if (!StringUtils.isEmpty(userPassword)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR,
userPassword);
return result;
}
+ if (CheckUtils.checkPasswordLength(userPassword)) {
+ putMsg(result, Status.USER_PASSWORD_LENGTH_ERROR);
+ return result;
+ }
Review Comment:
```suggestion
if (StringUtils.isEmpty(userPassword)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR,
userPassword);
return result;
}
if (CheckUtils.checkPasswordLength(userPassword)) {
putMsg(result, Status.USER_PASSWORD_LENGTH_ERROR);
return result;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]