Send email notifications when a token becomes expired.

Review Request #12591 — Created Sept. 12, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

Currently, users do not get notified about expired tokens. With this change, an
email is sent the first time an expired token is used. The email describes when
the token expired and how to create new tokens. If the email was successfully
sent, any subsequent uses of the token do not trigger another email.

This change also fixes up all of the API token email templates by adding date
formatting and fixing some missing URLs. The tests for the templates were also
fixed up.

  • Created unit tests for the expired token emails and ran unit tests in
    reviewboard/notifications/tests/test_email_sending.py
  • Manually tested authenticating with expired and non expired tokens, confirmed
    that appropriate emails were sent.

Diff Revision 3

This is not the most recent revision of the diff. The latest diff is revision 6. See what's changed.

orig
1
2
3
4
5
6

Commits

First Last Summary ID Author
Send email notifications when a token becomes expired.
02beaf6960bc85338a1c4ca41bcdce943b513a73 Michelle Aubin
reviewboard/notifications/email/__init__.py
reviewboard/notifications/email/message.py
reviewboard/notifications/email/signal_handlers.py
reviewboard/notifications/tests/test_email_sending.py
reviewboard/templates/notifications/api_token_expired.html
reviewboard/templates/notifications/api_token_expired.txt
Loading...