Change the default client token expiration from None to the value set in the site config.

Review Request #13410 — Created Nov. 8, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

Previously, the WebAPITokens.objects.get_or_create_client_token would create
client tokens with no expiration date by default. In most cases, we want to
create client tokens with the client_token_expiration value set in the site
configuration (e.g. 1 year from now). Instead of carrying around the logic for
this to multiple areas, this change makes this value the default expiration
for WebAPITokens.objects.get_or_create_client_token.

  • Tested creating client/using client tokens with RBTool's login.
  • Ran unit tests.

Diff Revision 1

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

orig
1
2

Commits

First Last Summary ID Author
Change the default client token expiration from None to the value set in
the site config.
1855cee714cfb18d5c164edb3f306430ff48ba08 Michelle Aubin
reviewboard/accounts/views.py
reviewboard/webapi/managers.py
reviewboard/webapi/tests/test_managers.py
Loading...