Only show Sandbox message on actually Sandbox

This commit is contained in:
Rick Falkvinge
2018-03-28 14:50:15 +02:00
parent f1cbd0b9a7
commit 04ea01c0e1
@@ -60,9 +60,13 @@ namespace Swarmops.Frontend.Pages.v5.Security
newAuthority.SetOrganization (suggestedOrganization); // will/can also modify Position
CurrentUser.LastLogonOrganizationId = suggestedOrganization.Identity;
// Set a dashboard message that the user is now working in Sandbox
if (suggestedOrganization.Identity == Organization.SandboxIdentity)
{
// Set a dashboard message that the user is now working in Sandbox
Response.SetCookie(new HttpCookie("DashboardMessage", CommonV5.JavascriptEscape(Resources.Global.Global_EnteringSandbox)));
Response.SetCookie(new HttpCookie("DashboardMessage",
CommonV5.JavascriptEscape(Resources.Global.Global_EnteringSandbox)));
}
if (!string.IsNullOrEmpty (returnUrlString))
{