Support email notification to admins of new registered users

Review Request #2309 — Created April 22, 2011 and submitted

Information

Review Board

Reviewers

Support email notification to admins of new registered users

Everytime a new user has registered, Review Board will send notification email to site admins. However, site admins have an option to turn it off.
Unit and manual tested.

Screenshots

chipx86
  1. This is looking pretty good :) Some stuff to fix, mostly stylistic.
  2. reviewboard/accounts/views.py (Diff revision 1)
     
     
     
     
     
    Make sure all parameters align.
  3. reviewboard/accounts/views.py (Diff revision 1)
     
     
    "succeeds".
    
    This should be in sentence casing and end with a period.
  4. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
    "Send e-mails when new users register an account"
  5. reviewboard/notifications/email.py (Diff revision 1)
     
     
    Can you change this to:
    
    siteconfig = SiteConfiguration.objects.get_current()
    
    This will guarantee it goes through our SiteConfiguration object cache/manager.
  6. reviewboard/notifications/email.py (Diff revision 1)
     
     
    Can you change this to:
    
    "New Review Board user registration for %s" % user.username
    
    David may have better ideas for the subject.
  7. reviewboard/notifications/email.py (Diff revision 1)
     
     
     
     
     
     
    Best to do:
    
    context = {
       'domain': ...,
       'domain_method': ...,
       ...
    }
  8. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    I know the other unit tests aren't in this style, but please change this to "test_new_user_email". We're slowly migrating to this style for unit test functions.
  9. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    Should end with a period.
  10. reviewboard/notifications/tests.py (Diff revision 1)
     
     
     
     
    Always a space after the :
    
    Also, when you have a lot to list, do:
    
    new_user_info = {
       'username': ...,
       ...
    }
    
    One last thing: best to use @example.com for test e-mail addresses.
  11. reviewboard/notifications/tests.py (Diff revision 1)
     
     
     
     
     
    First should be a get, I believe. Then do a post.
    
    Can you group the two gets/posts together, and have the comment before it? (Plus a blank line before the comment.)
  12. reviewboard/notifications/tests.py (Diff revision 1)
     
     
    The "[Django] " shouldn't be hard-coded. Instead, replace "[Django ]" with settings.EMAIL_SUBJECT_PREFIX.
  13. reviewboard/reviews/signals.py (Diff revision 1)
     
     
    Actually, this should live in accounts/signals.py.
  14. 
      
HO
Review request changed
chipx86
  1. Thanks! Committed with a few small text tweaks.
  2. 
      
Loading...