feat: subscription&unsubscribe flows - support scope all - #1786
Draft
davidgamez wants to merge 4 commits into
Draft
feat: subscription&unsubscribe flows - support scope all#1786davidgamez wants to merge 4 commits into
davidgamez wants to merge 4 commits into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This pull request introduces a one-click unsubscribe feature for notification emails by adding capability-based unsubscribe links, enhances the subscription deletion API to support batch unsubscription, and updates documentation and tests to reflect these changes. The unsubscribe links now point to a dedicated endpoint that securely identifies the subscription by its UUID, and the API supports both single and "unsubscribe from all" operations.
Unsubscribe link and email notification improvements:
_unsubscribe_urlfunction, which encodes the subscription UUID as a capability in the URL (/notifications/unsubscribe?id=...). The link is included in both single and digest email templates and only appears if a subscription ID is present. [1] [2] [3] [4]Subscription deletion API enhancements:
delete_subscriptionAPI to accept an optionalscopeparameter. Whenscope='all', the API unsubscribes the user from all notification types (except for announcements, which are disabled rather than deleted); otherwise, it only unsubscribes the specified subscription. [1] [2] [3]Documentation updates:
UserServiceAPI.yaml, emphasizing capability-based access and the lack of end-user authentication for these endpoints. Improved descriptions for parameters and documented the new unsubscribe flow. [1] [2] [3] [4] [5]Internal code and test improvements:
These changes collectively improve the user experience for unsubscribing from notifications, enhance API flexibility, and ensure the documentation and test suite accurately reflect the new behavior.
Expected behavior:
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
Testing tips:
Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything