Gallardot commented on code in PR #14577:
URL: 
https://github.com/apache/dolphinscheduler/pull/14577#discussion_r1267437690


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java:
##########
@@ -1336,7 +1336,7 @@ public Map<String, Object> registerUser(String userName, 
String userPassword, St
             putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "two 
passwords are not same");
             return result;
         }
-        User user = createUser(userName, userPassword, email, 1, "", "", 
Flag.NO.ordinal());
+        User user = createUser(userName, userPassword, email, -1, "", "", 
Flag.NO.ordinal());

Review Comment:
   This risk is already dealt with by DML. By default, a tenant with an id of 
-1 is added.
   
   
https://github.com/apache/dolphinscheduler/blob/399d0d0ce9be29724988dcbd9a7dc5fbfab44de0/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql#L19-L31



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