diff --git a/Site5/App_GlobalResources/Pages.Security.resx b/Site5/App_GlobalResources/Pages.Security.resx index 36196375..4036a250 100644 --- a/Site5/App_GlobalResources/Pages.Security.resx +++ b/Site5/App_GlobalResources/Pages.Security.resx @@ -212,6 +212,13 @@ Reset Password + + Sign me up for {0}! + {0} is the organization name. + + + Seeking to Join? + Swarmops doesn't recognize this address. Please log in manually and activate your address before using it to login. diff --git a/Site5/Global.asax b/Site5/Global.asax index 374343f6..d77a6e48 100644 --- a/Site5/Global.asax +++ b/Site5/Global.asax @@ -72,7 +72,7 @@ if (File.Exists (Server.MapPath (rewrittenCandidate))) { Context.RewritePath (rewrittenCandidate); - break; + break; // exits if match found - prevents, say, Default from replacing Dashboard (which happened as a Mono-only bug) } } } diff --git a/Site5/Security/Login.aspx b/Site5/Security/Login.aspx index 894c972c..9a862209 100644 --- a/Site5/Security/Login.aspx +++ b/Site5/Security/Login.aspx @@ -139,6 +139,9 @@ var bitIdUri = ''; var bitIdNonce = ''; + + var linkSelfSignup = ''; + @@ -206,6 +209,23 @@ + + + +

+ +
+
+ +
+
+ +
+ + diff --git a/Site5/Security/Login.aspx.cs b/Site5/Security/Login.aspx.cs index 5ff8c0f6..16724454 100644 --- a/Site5/Security/Login.aspx.cs +++ b/Site5/Security/Login.aspx.cs @@ -2,6 +2,7 @@ using System.Diagnostics; using System.Globalization; using System.IO; +using System.Runtime.Versioning; using System.Web; using System.Web.ExtensionMethods; using System.Web.Script.Serialization; @@ -128,6 +129,19 @@ namespace Swarmops.Pages.Security } + // If we're on a vanity domain, enable the self-signup link + + Organization vanityOrganization = Organization.FromVanityDomain (Request.Url.Host); + + if (vanityOrganization != null) + { + this.LiteralSelfSignupLink.Text = @"//" + vanityOrganization.VanityDomain + @"/Signup"; + this.LabelSelfSignup.Text = String.Format (Resources.Pages.Security.Login_SelfSignup, vanityOrganization.Name); + this.LabelSelfSignupHeader.Text = Resources.Pages.Security.Login_SelfSignupHeader; + this.PanelJoin.Visible = true; + } + + // If we're debugging, enable the auto- / impersonation login. This MUST NEVER fire outside of development environment. if (Debugger.IsAttached && Path.DirectorySeparatorChar == '\\')