Skip to content

Commit 0727b7b

Browse files
committed
CKS: skip password policy check for cks user in project
1 parent 0878f0f commit 0727b7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,10 @@ protected UserVO createUser(long accountId, String userName, String password, St
27472747
logger.debug("Creating user: " + userName + ", accountId: " + accountId + " timezone:" + timezone);
27482748
}
27492749

2750-
passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId());
2750+
Account callingAccount = getCurrentCallingAccount();
2751+
if (callingAccount.getId() != Account.ACCOUNT_ID_SYSTEM) {
2752+
passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId());
2753+
}
27512754

27522755
String encodedPassword = null;
27532756
for (UserAuthenticator authenticator : _userPasswordEncoders) {

0 commit comments

Comments
 (0)