GPDR compliance: require 2FA to see other people's data
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user