-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Include link to unsubscribe in email notifications #4301
Conversation
71aacc6
to
7d9689f
Compare
127fe09
to
9c54630
Compare
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.
@taitus Here's an initial review. Let me know what you think! 😉
287d758
to
aceb842
Compare
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.
Probably my final review here; just found a couple of typos and a possible cause of flaky tests. I'm gonna miss this pull request 😄.
Note that we only update a user with a new token if the user has not yet been assigned one.
The user can access this page without being logged in. We identify the user through the "subscriptions_token" parameter and show a list of the notifications that can be enable/disable. We will return a 404 error in case someone accesses the page with a non-existent token. We also control the case that some anonymous user tries to access the page without any token, by returning the CanCan::AccessDenied exception.
You can update the same "notifications" section that we allow you to update in "my account". This "subscriptions" section differs from the "my account" section because we do not need to be logged in to update the status of the notifications.
We modified the link that previously redirected us to the "My content" page to redirect us to the new page for managing subscriptions. We also adapted the existing generic text by adding a description of the related notification.
We modified the link that previously redirected us to the "My content" page to redirect us to the new page for managing subscriptions.
We modified the link that previously redirected us to the "My content" page to redirect us to the new page for managing subscriptions.
I think the "slashes" can be removed. The specs work fine without the "slashes".
We modified the link that previously redirected us to the "My content" page to redirect us to the new page for managing subscriptions. We also adapted the existing generic text by adding a description of the related notification.
We add new method set_user_locale to render the page with the user's preferred locale. Note that we add a condition 'if params[:locale].blank?' to recover the user's preferred locale. This is necessary because it may be the case that the user does not have an associated locale, and when execute '@user.locale' when this value is 'nil', by default returns the default locale. As we do not want this to happen and we want the locale we receive as parameter to prevail in this case.
Currently the translation: "Notify me by email when someone comments on my proposals or debates" It only refers to proposals and debates, but actually it also refers to budget investments, topics and polls.
Objectives
Allow users to unsubscribe from email notifications through an "Unsubscribe" link in the footer of the email without the need to log in.
This link will take them to a unsubscribe page where they can manage the notifications they want to receive.
Visual Changes