Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/2009#discussion_r106849093
  
    --- Diff: 
server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java ---
    @@ -166,7 +166,7 @@ public String authenticate(String command, Map<String, 
Object[]> params, HttpSes
                         throw new CloudAuthenticationException("Unable to find 
the domain from the path " + domain);
                     }
                     final UserAccount userAccount = 
_accountService.getActiveUserAccount(username[0], domainId);
    -                if (userAccount == null || 
!(User.Source.UNKNOWN.equals(userAccount.getSource()) || 
User.Source.LDAP.equals(userAccount.getSource()))) {
    +                if (userAccount != null && User.Source.SAML2 == 
userAccount.getSource()) {
    --- End diff --
    
    Why do we need to remove the check `userAccount == null`? Comparision 
against Source.SAML2 is fine as long as there are no other user sources other 
than LDAP, SAML2 and UNKNOWN. (UNKNOWN should be NATIVE though)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to