From 4bef3a6bfe6cae22f1151d398add3091b3b836ad Mon Sep 17 00:00:00 2001 From: "Larry Shatzer, Jr" Date: Mon, 25 Apr 2016 08:17:34 -0600 Subject: [PATCH] Having issues with this triggering all the time. Remove ldap exists check. The create record account will still take care of duplicate user ids... multiple accounts per email are now allowed, until this can be fixed properly. --- .../org/jenkinsci/account/Application.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/main/java/org/jenkinsci/account/Application.java b/src/main/java/org/jenkinsci/account/Application.java index bfa4179..634e52a 100644 --- a/src/main/java/org/jenkinsci/account/Application.java +++ b/src/main/java/org/jenkinsci/account/Application.java @@ -223,20 +223,6 @@ public class Application { blockReasons.add("circuit breaker"); } - final DirContext con = connect(); - try { - if(ldapObjectExists(con, "(id={0})", userid)) { - throw new UserError("ID " + userid + " is already taken. Perhaps you already have an account imported " + - "from legacy java.net? You may try resetting the password."); - } - if(ldapObjectExists(con, "(mail={0})", email)) { - throw new UserError("Mail " + email + " is already used for an account. If you have forgotten your " + - "password, you may try resetting it here."); - } - } finally { - con.close(); - } - String userDetails = userDetails(userid, firstName, lastName, email, ip, usedFor); if(blockReasons.size() > 0) { String body = "Rejecting, likely spam:\n\n" + userDetails + "\n\nHTTP Headers\n" + @@ -407,10 +393,6 @@ public class Application { return password; } - private boolean ldapObjectExists(DirContext con, String filterExpr, Object filterArgs) throws NamingException { - return con.search(params.newUserBaseDN(), filterExpr, new Object[]{filterArgs}, new SearchControls()).hasMore(); - } - /** * Handles the password reset form submission. */