Partly normalizing form binding.

This commit is contained in:
Jesse Glick committed 2014-08-11 16:32:57 -04:00
1 parent e91782e78f
commit 37f92b2459
18 files changed
+9 -7

No files matched your search

@@ -81,6 +81,8 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* {@link SecurityRealm} that performs authentication by looking up {@link User}.
@@ -130,6 +132,11 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
return !disableSignup;
}
@Restricted(NoExternalUse.class) // Jelly
public boolean getAllowsSignup() {
return allowsSignup();
}
/**
* Checks if captcha is enabled on user signup.
*
@@ -681,11 +688,6 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
public String getDisplayName() {
return Messages.HudsonPrivateSecurityRealm_DisplayName();
}
@Override
public String getHelpFile() {
return "/help/security/private-realm.html";
}
}
private static final Filter CREATE_FIRST_USER_FILTER = new Filter() {
@@ -25,8 +25,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
xmlns:f="/lib/form">
<f:entry title="" help="/help/security/private-realm/allow-signup.html">
<f:checkbox name="privateRealm.allowsSignup" checked="${h.defaultToTrue(instance.allowsSignup())}" title="${%Allow users to sign up}" />
<f:entry field="allowsSignup">
<f:checkbox default="true" title="${%Allow users to sign up}"/>
</f:entry>
<j:if test="${size(h.captchaSupportDescriptors) gt 0}">
<f:entry>