diff --git a/changelog.html b/changelog.html
index 6d81d68937..8bb20b0508 100644
--- a/changelog.html
+++ b/changelog.html
@@ -55,6 +55,9 @@ Upcoming changes
+ -
+ Do not throw exception on
/signup when not possible.
+ (issue 11172)
-
Fingerprint compaction aggravated lazy-loading performance issues.
(issue 19392)
diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java
index f2862872f2..7f76614105 100644
--- a/core/src/main/java/jenkins/model/Jenkins.java
+++ b/core/src/main/java/jenkins/model/Jenkins.java
@@ -3585,7 +3585,11 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
* Sign up for the user account.
*/
public void doSignup( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
- req.getView(getSecurityRealm(), "signup.jelly").forward(req, rsp);
+ if (getSecurityRealm().allowsSignup()) {
+ req.getView(getSecurityRealm(), "signup.jelly").forward(req, rsp);
+ return;
+ }
+ req.getView(SecurityRealm.class, "signup.jelly").forward(req, rsp);
}
/**
diff --git a/core/src/main/resources/hudson/security/SecurityRealm/signup.jelly b/core/src/main/resources/hudson/security/SecurityRealm/signup.jelly
new file mode 100644
index 0000000000..9f054b876c
--- /dev/null
+++ b/core/src/main/resources/hudson/security/SecurityRealm/signup.jelly
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
${%Sign up}
+ ${%This is not supported in the current configuration.}
+
+
+