made it possible to distinguish "no such user" from "I don't know if there's such an user", so that the UI can use this to improve error diagnostics.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14871 71c3de6d-444a-0410-be80-ed276b4c234a

Originally-Committed-As: 23bafefcf3b254c76f7d2744523bf117f37b9d88
This commit is contained in:
kohsuke 2009-01-29 17:02:28 +00:00
parent ddb9373dad
commit 4b0a39b206

View file

@ -187,7 +187,7 @@ public class LDAPSecurityRealm extends SecurityRealm {
return ldapSerach.searchForUser(username); return ldapSerach.searchForUser(username);
} catch (LdapDataAccessException e) { } catch (LdapDataAccessException e) {
LOGGER.log(Level.WARNING, "Failed to search LDAP for username="+username,e); LOGGER.log(Level.WARNING, "Failed to search LDAP for username="+username,e);
throw new UsernameNotFoundException(e.getMessage(),e); throw new UserMayOrMayNotExistException(e.getMessage(),e);
} }
} }
}); });