Fix bugs in the API tokens config page.
Review Request #12616 — Created Sept. 21, 2022 and submitted
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.
Summary | ID |
---|---|
710a8b7776f8287c45cf29de3593421e8bad7e28 |
Description | From | Last Updated |
---|---|---|
Typo in description: woudl -> would |
david | |
In this case, we'll alert but then continue on below and try to save with an undefined policy. Seems like … |
david | |
Let's move the definition of note into the if body here. No reason to fetch the value if we're not … |
david | |
Can you add a trailing comma here? |
david |
- Summary:
-
Fix bugs on API tokens config page.Fix bugs in the API tokens config page.
- Commits:
-
Summary ID c866dfcf4865f97e8d595e3e75b5cc82d9070efc a6a2c64a12f2c16fa8d176fc970e053be490c62d
Checks run (2 succeeded)
- Description:
-
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 woudl sometimes revert to ~ the wrong value. This would happen when for tokens that currently have a custom ~ 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. - Testing Done:
-
- Manually tested a bunch of combinations of changing expiration dates,
policies and notes on the tokens config page.
+ - Ran JS unit tests.
- Manually tested a bunch of combinations of changing expiration dates,
- Commits:
-
Summary ID a6a2c64a12f2c16fa8d176fc970e053be490c62d 710a8b7776f8287c45cf29de3593421e8bad7e28