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.

Commits

Files

    Loading...