From da11cf89d99060043a09406ddf31e6020f91939a 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 | 8 +++++++- src/fideslang/models.py | 16 +++++++++------- tests/fideslang/test_models.py | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a145d0e..9666c83d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,13 @@ The types of changes are: - `Fixed` for any bug fixes. - `Security` in case of vulnerabilities. -## [Unreleased](https://github.com/ethyca/fideslang/compare/1.4.4...main) +## [Unreleased](https://github.com/ethyca/fideslang/compare/1.4.5...main) + +## [1.4.5](https://github.com/ethyca/fideslang/compare/1.4.4...1.4.5) + +### Changed + +- Update `system.legal_basis_for_profiling` and `system.legal_basis_for_transfers` fields [#156](https://github.com/ethyca/fideslang/pull/156) ## [1.4.4](https://github.com/ethyca/fideslang/compare/1.4.3...1.4.4) diff --git a/src/fideslang/models.py b/src/fideslang/models.py index a9571a21..da39bb1d 100644 --- a/src/fideslang/models.py +++ b/src/fideslang/models.py @@ -163,9 +163,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" @@ -1114,15 +1114,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/",