Allow users to opt-out of their own updates.
Review Request #6429 — Created Oct. 10, 2014 and submitted — Latest diff uploaded
Add
should_send_own_updatesfield to Profile model. This field
determines whether or not the user should receive email updates about
their own activity, such as submitting review requests, reviewing
requests, or replying to review requests. The default value for this
field isTrue.Add an evolution,
profile_should_send_own_updates, to add the same
field to the Profile model. This evolution sets the value for the
field to the default:True.Add
should_send_own_updatesfield to the Profile settings dialog.
This field is tied to theshould_send_own_updatesfield on the
Profile model.Add
should_send_own_updatesmethod to the User model. This method is
patched on like the other methods inaccounts/models.py.The
send_review_emailremoves the user sending the email from the
set of recipients if they have theirshould_send_own_updatesfield
set to False unless they are one of the people assigned to the
peoplefield of the review request.
Ran evolution successfully.
Unit tests pass.
Tested with local development server. With
should_send_own_updates
set toFalse, when a review request is created, that user only
receives an email if they are assigned as a reviewer (in thepeople
field, not thegroupsfield).
| reviewboard/accounts/evolutions/profile_receive_own_updates.py |
|---|