Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinston Prakash2012-10-16 17:52:03 -0400
committerWinston Prakash2012-10-16 17:52:03 -0400
commit0b03758a71d2d4237c0d0c52daa3bc02b8e02923 (patch)
treec305eaff5f873142c1a1f161178bddfbd3b63ff7
parent9d6126dc82a9165a0673cf4d324575239fd85898 (diff)
downloadorg.eclipse.hudson.core-0b03758a71d2d4237c0d0c52daa3bc02b8e02923.tar.gz
org.eclipse.hudson.core-0b03758a71d2d4237c0d0c52daa3bc02b8e02923.tar.xz
org.eclipse.hudson.core-0b03758a71d2d4237c0d0c52daa3bc02b8e02923.zip
Fix: 392115 - Captcha field is shown in Signup Page though no Captcha plugin is installed
-rw-r--r--hudson-core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/hudson-core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java b/hudson-core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
index c961400f..9f917905 100644
--- a/hudson-core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
+++ b/hudson-core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
@@ -75,7 +75,7 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
/**
* If true, captcha will be enabled.
*/
- private final boolean enableCaptcha;
+ private boolean enableCaptcha;
/**
* If true, user will be notified of Hudson account creation.
*/
@@ -94,14 +94,18 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
*/
@Deprecated
public HudsonPrivateSecurityRealm(boolean allowsSignup, boolean enableCaptcha) {
- this(allowsSignup, true, null, false);
+ this(allowsSignup, enableCaptcha, null, false);
}
@DataBoundConstructor
public HudsonPrivateSecurityRealm(boolean allowsSignup, boolean enableCaptcha, CaptchaSupport captchaSupport, boolean notifyUser) {
this.disableSignup = !allowsSignup;
this.enableCaptcha = enableCaptcha;
- setCaptchaSupport(captchaSupport);
+ if (captchaSupport != null){
+ setCaptchaSupport(captchaSupport);
+ }else{
+ this.enableCaptcha = false;
+ }
this.notifyUser = notifyUser;
if (!allowsSignup && !hasSomeUser()) {

Back to the top