Add signals for token creation and update
Review Request #9275 — Created Oct. 17, 2017 and submitted
We now emit a signal (
djblets.webapi.signals.webapi_token_created
)
when we generate a token viaWebAPITokens.objects.generate_token()
method. In addition, this method now takes anauto_generated
parameter
to indicate whether or not the created token is being automatically
generated by some process (such as an integration). This can be used by
signal consumers to determine, e.g., whether or not an e-mail should be
sent upon token generation.
Ran /r/9285/ unit tests.
Description | From | Last Updated |
---|---|---|
This needs unit tests in Djblets. |
chipx86 | |
Why are the .version files added? They shouldn't be needed (and are unrelated to this change). |
chipx86 | |
F821 undefined name 'SignalsTests' |
reviewbot | |
Seems auto_generated can live in the function definition. Also, signal handlers don't need to take *args. These apply below as … |
chipx86 | |
Mind updating this to say it doesn't impact token generation but instead is passed on to the signal? |
chipx86 | |
testing before webapi |
david |
- Change Summary:
-
Add unit tests.
- Commit:
-
aec5c0160f273cc766bdf5990d5e90fa3c103debd5e6e2f12d4963e7a97d54e1337d9e112ccbe6c8
- Commit:
-
d5e6e2f12d4963e7a97d54e1337d9e112ccbe6c846b282196dd97244b23e61f2d529ec0841c945fd
Checks run (2 succeeded)
- Change Summary:
-
Cleanup according to Christian's issues
- Commit:
-
46b282196dd97244b23e61f2d529ec0841c945fd0488c6bad0577f2c4ae9b4486126395d7100afca