diff --git a/BuildFiles/Logs/changelog-5.01-beta-06.txt b/BuildFiles/Logs/changelog-5.01-beta-06.txt index dbe85b90..0c12c3bf 100644 --- a/BuildFiles/Logs/changelog-5.01-beta-06.txt +++ b/BuildFiles/Logs/changelog-5.01-beta-06.txt @@ -9,6 +9,7 @@ x NEW FEATURES x IMPROVEMENTS +- GPDR compliance: A person must now have 2FA enabled to see other people's data - (IN PROGRESS) Changed bank file reader to use CSV helper diff --git a/Logic/Security/Authority.cs b/Logic/Security/Authority.cs index d4e7b996..b39a2a41 100644 --- a/Logic/Security/Authority.cs +++ b/Logic/Security/Authority.cs @@ -354,6 +354,16 @@ namespace Swarmops.Logic.Security public People FilterPeople(People rawList, AccessAspect aspect = AccessAspect.Participation) { + if (!this.Person.TwoFactorEnabled) + { + if (this.Organization.Identity != Organization.SandboxIdentity) + { + // GPDR compliance: to see any personal data, require 2FA to be turned on + + return new People(); + } + } + if (aspect != AccessAspect.Participation && aspect != AccessAspect.PersonalData) { throw new ArgumentException(@"AccessAspect needs to reflect visibility of people data", "aspect"); @@ -524,6 +534,17 @@ namespace Swarmops.Logic.Security throw new ArgumentException(@"AccessAspect needs to reflect visibility of people data", "aspect"); } + if (!this.Person.TwoFactorEnabled) + { + if (this.Organization.Identity != Organization.SandboxIdentity) + { + // GPDR compliance: to see any personal data, require 2FA to be turned on + + return false; + } + } + + // Three cases: // 1) the current Position has system-level access. diff --git a/Logic/Swarm/Person.cs b/Logic/Swarm/Person.cs index 82f093fd..7db4fe46 100644 --- a/Logic/Swarm/Person.cs +++ b/Logic/Swarm/Person.cs @@ -269,6 +269,16 @@ namespace Swarmops.Logic.Swarm set { OptionalData.SetOptionalDataString (ObjectOptionalDataType.BitIdLoginAddress, value); } } + public virtual bool BitIdEnabled + { + get { return !string.IsNullOrEmpty(BitIdAddress); } + } + + public virtual bool TwoFactorEnabled + { + get { return BitIdEnabled; } + } + public virtual bool MailUnreachable {