yangyichao-mango commented on a change in pull request #3403:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/3403#discussion_r464959223



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
##########
@@ -934,10 +936,51 @@ private void copyResourceFiles(ResourceComponent 
resourceComponent, String srcBa
             putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "two 
passwords are not same");
             return result;
         }
-
-        createUser(userName, userPassword, email, 1, "", "", 0);
+        User user = createUser(userName, userPassword, email, 1, "", "", 
Flag.NO.ordinal());
         putMsg(result, Status.SUCCESS);
+        result.put(Constants.DATA_LIST, user);
         return result;
     }
 
+    /**
+     * activate user, only system admin have permission, change user state 
code 0 to 1
+     *
+     * @param loginUser login user
+     * @return create result code
+     */
+    public Map<String, Object> activateUser(User loginUser, String userName) {
+        Map<String, Object> result = new HashMap<>(5);

Review comment:
       ```suggestion
           Map<String, Object> result = new HashMap<>();
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to