-
Notifications
You must be signed in to change notification settings - Fork 77
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
Update fides_disable_save_api option in FidesJS SDK to disable both privacy-preferences & notice-served APIs #4860
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
Couple notes!
const historyId1 = "pri_mock_history_id_1"; | ||
const historyId2 = "pri_mock_history_id_2"; | ||
const buildMockNotices = (): PrivacyNotice[] => [ |
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.
DRY'd this up a bit to make these specs easier to read and reuse.
// Disable the notices-served API if the fides_disable_save_api option is set | ||
if (options.fidesDisableSaveApi) { | ||
return; | ||
} |
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.
This is all that was actually needed 👍
…ble-notices-served-api
Passing run #7604 ↗︎Details:
Review all test suite changes for PR #4860 ↗︎ |
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.
Looks great!
} | ||
|
||
// Disable the notices-served API if the serving component is a regular | ||
// banner (or unknown!). This means we trigger the API for: |
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.
Thanks for adding this helpful comment 👍🏼
@@ -2338,6 +2290,50 @@ describe("Consent overlay", () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
it("when fides_disable_save_api option is set, disables notices-served & privacy-preferences APIs", () => { |
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.
🚀
…rivacy-preferences & notice-served APIs (#4860)
Closes PROD-2017
Description Of Changes
This is a small change to make the
fides_disable_save_api
option more consistent; in usage, we expected this to disable all save APIs (both notices-served & privacy-preferences), but as of today only the privacy-preferences API is disabled, which was surprising.As with a lot of PRs, the majority of the changes here are updating the tests 😄
Code Changes
notices-served
iffides_disable_save_api
option istrue
Steps to Confirm
?fides_disable_save_api=true
as a query paramnotices-served
andprivacy-preferences
are not calledPre-Merge Checklist
CHANGELOG.md