• 
      

    Send e-mails to a user when their API tokens are created/updated/deleted.

    Review Request #8168 — Created May 17, 2016 and submitted

    Information

    Review Board
    release-2.5.x

    Reviewers

    In order to help keep accounts safe, this change adds e-mail
    notifications when something creates a new API token or updates/deleted
    an existing one. This way, if something malicious somehow creates a
    token on their behalf, or tricks them into creating a token, they'll be
    notified so they can do something about it.
    
    The create/update e-mails contain enough information to identify the
    token without exposing the full token (in order to prevent someone with
    e-mail access from reading the token ID). The delete e-mail contains the
    full token, which is no longer in use at this point, so any
    scripts/services using it can be identified.

    Unit tests pass.

    Tested creating a token, updating it, and deleting it. Received e-mails
    for each operation, and verified the HTML and text contents.

    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      Ignored Files:
          reviewboard/templates/notifications/new_user_email.txt
          reviewboard/templates/notifications/api_token_created.txt
          reviewboard/templates/notifications/api_token_updated.html
          reviewboard/templates/notifications/api_token_deleted.html
          reviewboard/templates/notifications/api_token_updated.txt
          reviewboard/templates/notifications/api_token_created.html
          reviewboard/templates/notifications/api_token_deleted.txt
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/notifications/email.py
          reviewboard/notifications/tests.py
      
      Ignored Files:
          reviewboard/templates/notifications/new_user_email.txt
          reviewboard/templates/notifications/api_token_created.txt
          reviewboard/templates/notifications/api_token_updated.html
          reviewboard/templates/notifications/api_token_deleted.html
          reviewboard/templates/notifications/api_token_updated.txt
          reviewboard/templates/notifications/api_token_created.html
          reviewboard/templates/notifications/api_token_deleted.txt
      
      
    2. 
        
    brennie
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.5.x (3b5d178)