lyleshaw commented on code in PR #11255:
URL: https://github.com/apache/dolphinscheduler/pull/11255#discussion_r943663470


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -406,8 +392,7 @@ public Map<String, Object> updateUser(User loginUser, int 
userId,
             throw new ServiceException(Status.USER_NOT_EXIST.getMsg());
         }
 
-        checkUserParams(userPassword, email, phone, state);
-
+        checkUserParams(userName, userPassword, email, phone);

Review Comment:
   Due to `check params` are used by both `createUser` and `updateUser` (one of 
which requires that `userName` does not exist and one of which requires that it 
must exist), `check params` cannot take `userName` as an argument and should be 
handled by each function.



##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -406,8 +392,7 @@ public Map<String, Object> updateUser(User loginUser, int 
userId,
             throw new ServiceException(Status.USER_NOT_EXIST.getMsg());
         }
 
-        checkUserParams(userPassword, email, phone, state);
-
+        checkUserParams(userName, userPassword, email, phone);

Review Comment:
   Due to `check params` are used by both `createUser` and `updateUser` (one of 
which requires that `userName` does not exist and one of which requires that it 
must exist), `check params` cannot take `userName` as an argument and should be 
handled by each function.



-- 
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]

Reply via email to