From 6932bce819060c2d1440037ddd04d0c984d4f0ab Mon Sep 17 00:00:00 2001 From: Adam Sachs Date: Fri, 25 Aug 2023 15:46:31 -0400 Subject: [PATCH] fideslang - update `system.legal_basis_for_transfers` and `system.legal_basis_for_profiling` (#156) * update legal_basis_for_transfers - make multivalue and update allowed values * make legal_basis_for_profiling multivalue * update changelog --- CHANGELOG.md | 4 ++++ src/fideslang/models.py | 16 +++++++++------- tests/fideslang/test_models.py | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bbc066c..9dfb0d06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ The types of changes are: ## [Unreleased](https://github.com/ethyca/fideslang/compare/2.0.1...main) +### Changed + +- Update `system.legal_basis_for_profiling` and `system.legal_basis_for_transfers` fields [#156](https://github.com/ethyca/fideslang/pull/156) + ## [2.0.1](https://github.com/ethyca/fideslang/compare/2.0.0...2.0.1) ### Changed diff --git a/src/fideslang/models.py b/src/fideslang/models.py index b2f39a60..cc7fe9da 100644 --- a/src/fideslang/models.py +++ b/src/fideslang/models.py @@ -227,9 +227,9 @@ class LegalBasisForProfilingEnum(str, Enum): class LegalBasisForTransfersEnum(str, Enum): """The model for describing the legal basis under which data is transferred""" - ADEQUACY_DECISION = "Adequacy decision" - STANDARD_CONTRACTUAL_CLAUSES = "Standard contractual clauses" - BINDING_CORPORATE_RULES = "Binding corporate rules" + ADEQUACY_DECISION = "Adequacy Decision" + SCCS = "SCCs" + BCRS = "BCRs" OTHER = "Other" @@ -1173,15 +1173,17 @@ class System(FidesModel): default=False, description="Whether the vendor uses data to profile a consumer in a way that has a legal effect.", ) - legal_basis_for_profiling: Optional[LegalBasisForProfilingEnum] = Field( - description="The legal basis for performing profiling that has a legal effect.", + legal_basis_for_profiling: List[LegalBasisForProfilingEnum] = Field( + default_factory=list, + description="The legal basis (or bases) for performing profiling that has a legal effect.", ) does_international_transfers: bool = Field( default=False, description="Whether this system transfers data to other countries or international organizations.", ) - legal_basis_for_transfers: Optional[LegalBasisForTransfersEnum] = Field( - description="The legal basis under which the data is transferred.", + legal_basis_for_transfers: List[LegalBasisForTransfersEnum] = Field( + default_factory=list, + description="The legal basis (or bases) under which the data is transferred.", ) requires_data_protection_assessments: bool = Field( default=False, diff --git a/tests/fideslang/test_models.py b/tests/fideslang/test_models.py index 93c7132a..4a1bf365 100644 --- a/tests/fideslang/test_models.py +++ b/tests/fideslang/test_models.py @@ -402,9 +402,9 @@ def test_expanded_system(self): exempt_from_privacy_regulations=False, reason_for_exemption=None, uses_profiling=True, - legal_basis_for_profiling="Explicit consent", + legal_basis_for_profiling=["Explicit consent", "Contract"], does_international_transfers=True, - legal_basis_for_transfers="Standard contractual clauses", + legal_basis_for_transfers=["Adequacy Decision", "SCCs"], requires_data_protection_assessments=True, dpa_location="www.example.com/dpa_location", privacy_policy="https://vdx.tv/privacy/",