-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Executing Consent Requests via the Privacy Request Execution Layer [#…
…2146] (#2125) Adds the foundation to execute consent requests via the privacy request execution framework. When consent preferences are changed, a PrivacyRequest is created (with a Policy > Consent Rule attached) to propagate those consent preferences to third party services, server-side.
- Loading branch information
Showing
25 changed files
with
982 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...fides/api/ctl/migrations/versions/de456534dbda_add_privacyrequest_consent_preferences_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"""add privacyrequest consent preferences and ruleuse table | ||
Revision ID: de456534dbda | ||
Revises: 3caf11127442 | ||
Create Date: 2023-01-03 22:59:45.144538 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "de456534dbda" | ||
down_revision = "3caf11127442" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.add_column( | ||
"privacyrequest", | ||
sa.Column( | ||
"consent_preferences", | ||
postgresql.JSONB(astext_type=sa.Text()), | ||
nullable=True, | ||
), | ||
) | ||
|
||
op.add_column( | ||
"consentrequest", sa.Column("privacy_request_id", sa.String(), nullable=True) | ||
) | ||
op.create_foreign_key( | ||
None, "consentrequest", "privacyrequest", ["privacy_request_id"], ["id"] | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column("privacyrequest", "consent_preferences") | ||
|
||
op.drop_constraint( | ||
"consentrequest_privacy_request_id_fkey", "consentrequest", type_="foreignkey" | ||
) | ||
op.drop_column("consentrequest", "privacy_request_id") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.