-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executable consent types for the privacy center #2193
Executable consent types for the privacy center #2193
Conversation
src/fides/api/ops/api/v1/endpoints/consent_request_endpoints.py
Outdated
Show resolved
Hide resolved
src/fides/api/ops/api/v1/endpoints/consent_request_endpoints.py
Outdated
Show resolved
Hide resolved
@pattisdr Still working on this (especially the backend tests) but would appreciate if you think this is the right approach so far! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes Allison. A few bugs and questions here.
Responding to:
And there's also this error message, though I'm not quite sure it belongs in a toast?
Hm, this is tricky. I was hoping we could get an invalid config.json
to throw an error on next build so the customer is made aware. As-is, this doesn't prevent all executables=true from sending a request.
If we can't prevent it from building, or similar, perhaps they get a message that there's something wrong with the system, and we don't allow the consent request to be saved from the UI in the first place. Just brainstorming here.
src/fides/api/ops/api/v1/endpoints/consent_request_endpoints.py
Outdated
Show resolved
Hide resolved
src/fides/api/ops/api/v1/endpoints/consent_request_endpoints.py
Outdated
Show resolved
Hide resolved
src/fides/api/ops/api/v1/endpoints/consent_request_endpoints.py
Outdated
Show resolved
Hide resolved
Okay the backend fixes are in. Still mulling over how best to show an error when there are multiple |
Okay, I ended up putting some logic that gets called during the build stage and I think it works! To test:
But if you change the The build one isn't as clean unfortunately, but it's nice that it runs through the same logic as The only drawback is you won't get immediate feedback when you change your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allisonking great work, nice solution with getting the build to fail so there's an early warning. This works great to enable this first iteration to limiting a single data use case to being executable.
Closes #2122
Code Changes
config.json
executable
s tofalse
, both in the privacy center directory, and thetest_env
privacy center directoryload_executable_consent_options
and referencespolicy_key
and a list ofexecutable_options
from the frontend to/consent-request/{{consent_request_id}}/preferences
queue_privacy_request_to_propagate_consent
to make PrivacyRequest objs based on the list of passed inexecutable_options
executable: true
in theconfig.json
Steps to Confirm
test_env/privacy_center_config/config.json
to have one consent option beexecutable: true
nox -s test_env
executable_options
sent to the endpoint if you look in the Network tabtest_env/privacy_center_config/config.json
to have more than one consent option beexecutable: true
nox -s test_env
executable
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
Endpoint now takes

executable_options
and privacy center passes those inAnd there's also this error message, though I'm not quite sure it belongs in a toast?

I think the changes I made are mostly covered by existing test cases, but lemme know if there are other tests I should add!