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 2 (Latest)

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.
4e6132d1dddbce11fc47b265d87c1bbea0fd2e32 Michelle Aubin
reviewboard/accounts/views.py
reviewboard/webapi/managers.py
reviewboard/webapi/tests/test_managers.py
Loading...