Fix bugs in the API tokens config page.

Review Request #12616 — Created Sept. 21, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

While testing the new token expiration controls on the API tokens page, it was
discovered that the displayed expiration date would revert to an old value
whenever the policy type changed. To fix this, we update the displayed
expiration date whenever its value changes and whenever the token's information
is rendered.

This change also fixes two bugs related to the custom policy editor. The first
being that you couldn't set custom policies due to an out of scope variable.
Secondly, canceling out of the custom policy editor would sometimes revert to
the wrong value. This would happen for tokens that currently have a custom
policy set.

  • Manually tested a bunch of combinations of changing expiration dates,
    policies and notes on the tokens config page.
  • Ran JS unit tests.

Diff Revision 2

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

orig
1
2
3

Commits

First Last Summary ID Author
Fix bugs on API tokens config page.
a6a2c64a12f2c16fa8d176fc970e053be490c62d Michelle Aubin
reviewboard/static/rb/js/accountPrefsPage/views/apiTokensView.es6.js
Loading...