Skip to content

Commit a5963f2

Browse files
authored
Merge pull request #2009 from Accelerite/CLOUDSTACK-9369
CLOUDSTACK-9369 Fixed Ldap regression
2 parents 1be37e4 + b40098d commit a5963f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public String authenticate(String command, Map<String, Object[]> params, HttpSes
166166
throw new CloudAuthenticationException("Unable to find the domain from the path " + domain);
167167
}
168168
final UserAccount userAccount = _accountService.getActiveUserAccount(username[0], domainId);
169-
if (userAccount == null || !(User.Source.UNKNOWN.equals(userAccount.getSource()) || User.Source.LDAP.equals(userAccount.getSource()))) {
169+
if (userAccount != null && User.Source.SAML2 == userAccount.getSource()) {
170170
throw new CloudAuthenticationException("User is not allowed CloudStack login");
171171
}
172172
return ApiResponseSerializer.toSerializedString(_apiServer.loginUser(session, username[0], pwd, domainId, domain, remoteAddress, params),

0 commit comments

Comments
 (0)