Skip to content

Commit fbcf27f

Browse files
committed
Include the external consent management url config
1 parent 993b258 commit fbcf27f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

config/settings/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ def _add_hawk_credentials(id_env_name, key_env_name, scopes):
752752

753753
S3_LOCAL_ENDPOINT_URL = env("S3_LOCAL_ENDPOINT_URL", default='')
754754
ENABLE_CONTACT_CONSENT_INGEST = env("ENABLE_CONTACT_CONSENT_INGEST", default=False)
755+
CONSENT_DATA_MANAGEMENT_URL = env("CONSENT_DATA_MANAGEMENT_URL", default='')
755756

756757
# Initially set to 1 hour, to increase once confirmed it's successful.
757758
SECURE_HSTS_SECONDS = 3600

datahub/company/serializers.py

+6
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ class ContactSerializer(PermittedFieldsModelSerializer):
173173
primary = serializers.BooleanField()
174174
valid_email = serializers.BooleanField(required=False, allow_null=True)
175175
consent_data = serializers.JSONField(required=False, allow_null=True)
176+
consent_data_management_url = serializers.SerializerMethodField()
177+
178+
def get_consent_data_management_url(self, obj):
179+
return f'{settings.CONSENT_DATA_MANAGEMENT_URL}{obj.email}'
176180

177181
def validate_email(self, value):
178182
"""
@@ -229,10 +233,12 @@ class Meta:
229233
'modified_on',
230234
'address_area',
231235
'consent_data',
236+
'consent_data_management_url',
232237
)
233238
read_only_fields = (
234239
'archived_documents_url_path',
235240
'consent_data',
241+
'consent_data_management_url',
236242
)
237243
validators = [
238244
NotArchivedValidator(),

sample.env

+1
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ INTERACTION_NOTIFICATION_API_KEY=
8585
EXPORT_WIN_NOTIFICATION_API_KEY=
8686

8787
S3_LOCAL_ENDPOINT_URL=http://localstack:4566
88+
CONSENT_DATA_MANAGEMENT_URL=http://hostedform.dbtdomain.com?email=

0 commit comments

Comments
 (0)