lyleshaw commented on code in PR #11255:
URL: https://github.com/apache/dolphinscheduler/pull/11255#discussion_r943387613
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -1107,6 +1070,52 @@ private String checkUserParams(String userName, String
password, String email, S
return msg;
}
+ /**
+ * @return if check failed throw error, otherwise return null
+ */
+ private void checkUserParams(String userName, String userPassword, String
email, String phone, Integer state) {
+
+ if (StringUtils.isNotEmpty(userName)) {
+
+ if (!CheckUtils.checkUserName(userName)) {
+ throw new ServiceException(String.format("userName %s doesn't
valid", userName));
Review Comment:
> ```diff
> - throw new ServiceException(String.format("userName %s doesn't valid",
userName));
> + throw new
ServiceException(Status.REQUEST_PARAMS_NOT_VALID_ERROR.getMsg(), userName));
> ```
get
--
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]