From 04ea01c0e1dcae520c3db7d02fc8d62a86a5ed27 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 28 Mar 2018 14:50:15 +0200 Subject: [PATCH] Only show Sandbox message on actually Sandbox --- Site/Pages/v5/Security/SetCurrentOrganization.aspx.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Site/Pages/v5/Security/SetCurrentOrganization.aspx.cs b/Site/Pages/v5/Security/SetCurrentOrganization.aspx.cs index 59e8b161..7be025a5 100644 --- a/Site/Pages/v5/Security/SetCurrentOrganization.aspx.cs +++ b/Site/Pages/v5/Security/SetCurrentOrganization.aspx.cs @@ -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)) {