Allow users to opt-out of their own updates.

Review Request #6429 — Created Oct. 10, 2014 and submitted — Latest diff uploaded

Review Board
reviewboard, students

Add should_send_own_updates field 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 is True.

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_updates field to the Profile settings dialog.
This field is tied to the should_send_own_updates field on the
Profile model.

Add should_send_own_updates method to the User model. This method is
patched on like the other methods in accounts/

The send_review_email removes the user sending the email from the
set of recipients if they have their should_send_own_updates field
set to False unless they are one of the people assigned to the
people field of the review request.

Ran evolution successfully.

Unit tests pass.

Tested with local development server. With should_send_own_updates
set to False, when a review request is created, that user only
receives an email if they are assigned as a reviewer (in the people
field, not the groups field).