From 18d411cfeb84d8e310ab1ad31a8ed665bf5d63f0 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 7 Mar 2018 21:41:45 +0100 Subject: [PATCH] Dumbfix --- Site/Security/Login.aspx.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Site/Security/Login.aspx.cs b/Site/Security/Login.aspx.cs index 242b0c2a..3b08094c 100644 --- a/Site/Security/Login.aspx.cs +++ b/Site/Security/Login.aspx.cs @@ -346,7 +346,9 @@ namespace Swarmops.Pages.Security Authority testAuthority = Authority.FromLogin (authenticatedPerson, Organization.FromIdentity (lastOrgId)); - if (!authenticatedPerson.ParticipatesInOrganizationOrParent (lastOrgId) && !authenticatedPerson.ApplicantInOrganization (lastOrgId) && !testAuthority.HasSystemAccess (AccessType.Read)) + Organization lastOrganization = Organization.FromIdentity(lastOrgId); + + if (!authenticatedPerson.ParticipatesInOrganizationOrParent (lastOrganization) && !authenticatedPerson.ApplicantInOrganization (lastOrganization) && !testAuthority.HasSystemAccess (AccessType.Read)) { // If the person doesn't have access to the last organization (anymore), log on to Sandbox // unless first pilot, in which case throw (deny login)