diff --git a/Logic/Support/PilotInstallationIds.cs b/Logic/Support/PilotInstallationIds.cs index bfd7412b..ea5f5196 100644 --- a/Logic/Support/PilotInstallationIds.cs +++ b/Logic/Support/PilotInstallationIds.cs @@ -10,6 +10,9 @@ namespace Swarmops.Logic.Support static public string PiratePartySE { get { return "d7588903-5fd0-40cf-a5b1-9af7a722cb6e"; } } + static public string DevelopmentSandbox + { get { return "a8187d16-d913-4ddc-a3d5-214f7c14aac5"; } } + static public bool IsPilot(string installationId) { string thisInstallationId = Persistence.Key["SwarmopsInstallationId"]; diff --git a/Site5/Security/Login.aspx.cs b/Site5/Security/Login.aspx.cs index ba3bcf7c..c786f7dc 100644 --- a/Site5/Security/Login.aspx.cs +++ b/Site5/Security/Login.aspx.cs @@ -6,6 +6,7 @@ using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; +using Swarmops.Logic.Support; using Swarmops.Logic.Swarm; using Swarmops.Basic.Types; using Swarmops.Database; @@ -24,12 +25,23 @@ namespace Swarmops.Pages.Security return; } + // If this is the Dev Sandbox, autologin + + if (Request.Url.Host == "dev.swarmops.com" && + PilotInstallationIds.IsPilot(PilotInstallationIds.DevelopmentSandbox)) + { + Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode("
You have been logged on as Sandbox Administrator to the Swarmops Development Sandbox.
This machine runs the latest development build, so you may run into diagnostic code and half-finished features. All data here is bogus test data and is reset every night.
In other words, welcome, and play away!
"))); + FormsAuthentication.RedirectFromLoginPage("1,1", true); + } + + // THE DAMN BITID NEEDS TO GO INTO ANDROID WALLET SO WE CAN STREAMLINE AND REWRITE THIS POS this.LabelLoginFailed.Visible = false; this.TextLogin.Focus(); + // Check for SSL and force it // Special case for CloudFlare deployments - there is a case where somebody will get their connections de-SSLed at the server