vishesh92 commented on code in PR #13955:
URL: https://github.com/apache/cloudstack/pull/13955#discussion_r3965232179


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java:
##########
@@ -191,10 +192,13 @@ public void execute() {
 
     /**
      * TODO: this should be done through a validator. for now replicating the 
validation logic in create account and user
+     *
+     * <p>A blank password generates a random one instead of failing, since an 
account that will
+     * only ever authenticate externally (SAML/LDAP) has no need for the admin 
to set one.
      */
     private void validateParams() {
-        if(StringUtils.isEmpty(getPassword())) {
-            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty 
passwords are not allowed");
+        if (StringUtils.isEmpty(getPassword())) {

Review Comment:
   should we use isBlank here instead?



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