Support not sending e-mails on WebAPI token creation

Review Request #9258 - Created Oct. 10, 2017 and updated

Barret Rennie
Review Board
release-3.0.x
9275
9259
2312e9f...
reviewboard

Currently when a WebAPI token is created, we always send an e-mail
notifying the user of its creation. However, this is not always ideal.
Some extensions and/or integrations require a WebAPI token in order to
communicate with Review Board from some external service (such as
CircleCI). In this case, we do not need to bother the user with a
notification that the token was created.

Djblets now has support for token update and create signals (via
/r/9275). We use these signals to determine if the token generated was
auto-generated. The notifications module has been modified to listen
to the new signals (instead of the generic post_save signal it was
listening to before) and not send e-mails when the token in question
is auto-generated.

Ran unit tests.

  • 2
  • 0
  • 10
  • 0
  • 12
Description From Last Updated
This can fit on one line. Christian Hammond Christian Hammond
"WebAPIToken" Christian Hammond Christian Hammond
Barret Rennie
David Trowbridge
Barret Rennie
Barret Rennie
Barret Rennie
Barret Rennie
David Trowbridge
Barret Rennie
Review request changed

Change Summary:

Addressed David's issues

Commit:

-40d45803bf5ab164b6373048e5d08f9d825df73c
+2312e9f8fc2ea984d1f73d336c7ceef23d69bc0b

Diff:

Revision 6 (+53 -23)

Show changes

Checks run (2 succeeded)

JSHint passed.
flake8 passed.
Christian Hammond
  1. 
      
  2. reviewboard/notifications/email/__init__.py (Diff revision 6)
     
     
     

    This can fit on one line.

  3. reviewboard/notifications/tests.py (Diff revision 6)
     
     

    "WebAPIToken"

  4. 
      
Loading...