Loading cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserDAO.java +26 −0 Original line number Diff line number Diff line Loading @@ -576,6 +576,19 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO searchResult = getReadOnlyConnection().searchForEntry(searchRequest); } catch (LDAPSearchException e) { if (e.getResultCode() == ResultCode.SIZE_LIMIT_EXCEEDED) { String msg = "More than one User with email address " + emailAddress + " found"; logger.debug(msg); throw new UserNotFoundException(msg); } else { LdapDAO.checkLdapResult(e.getResultCode()); } } catch (LDAPException e) { LdapDAO.checkLdapResult(e.getResultCode()); Loading @@ -591,6 +604,19 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO { searchResult = getReadOnlyConnection().searchForEntry(searchRequest); } catch (LDAPSearchException e) { if (e.getResultCode() == ResultCode.SIZE_LIMIT_EXCEEDED) { String msg = "More than one User with email address " + emailAddress + " found"; logger.debug(msg); throw new UserNotFoundException(msg); } else { LdapDAO.checkLdapResult(e.getResultCode()); } } catch (LDAPException e) { LdapDAO.checkLdapResult(e.getResultCode()); Loading cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/web/ResetPasswordServlet.java +8 −1 Original line number Diff line number Diff line Loading @@ -187,9 +187,16 @@ public class ResetPasswordServlet extends HttpServlet log.debug(msg, e); logInfo.setMessage(msg); if (e instanceof UserNotFoundException) { if (e.getMessage().contains("More than one user")) { response.setStatus(HttpServletResponse.SC_CONFLICT); } else { response.setStatus(HttpServletResponse.SC_NOT_FOUND); } } else { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); Loading Loading
cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/ldap/LdapUserDAO.java +26 −0 Original line number Diff line number Diff line Loading @@ -576,6 +576,19 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO searchResult = getReadOnlyConnection().searchForEntry(searchRequest); } catch (LDAPSearchException e) { if (e.getResultCode() == ResultCode.SIZE_LIMIT_EXCEEDED) { String msg = "More than one User with email address " + emailAddress + " found"; logger.debug(msg); throw new UserNotFoundException(msg); } else { LdapDAO.checkLdapResult(e.getResultCode()); } } catch (LDAPException e) { LdapDAO.checkLdapResult(e.getResultCode()); Loading @@ -591,6 +604,19 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO { searchResult = getReadOnlyConnection().searchForEntry(searchRequest); } catch (LDAPSearchException e) { if (e.getResultCode() == ResultCode.SIZE_LIMIT_EXCEEDED) { String msg = "More than one User with email address " + emailAddress + " found"; logger.debug(msg); throw new UserNotFoundException(msg); } else { LdapDAO.checkLdapResult(e.getResultCode()); } } catch (LDAPException e) { LdapDAO.checkLdapResult(e.getResultCode()); Loading
cadcAccessControl-Server/src/ca/nrc/cadc/ac/server/web/ResetPasswordServlet.java +8 −1 Original line number Diff line number Diff line Loading @@ -187,9 +187,16 @@ public class ResetPasswordServlet extends HttpServlet log.debug(msg, e); logInfo.setMessage(msg); if (e instanceof UserNotFoundException) { if (e.getMessage().contains("More than one user")) { response.setStatus(HttpServletResponse.SC_CONFLICT); } else { response.setStatus(HttpServletResponse.SC_NOT_FOUND); } } else { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); Loading