Display deprecation notices on the API tokens config page and deprecation status in the resource.
Review Request #12631 — Created Sept. 26, 2022 and submitted — Latest diff uploaded
This change adds a
deprecated
field to the API token web API resource. This
is a bool showing whether the token was generated by a deprecated token
generator. We also now display a notice on the API tokens config page if a
token is deprecated. The notice encourages the user to delete the deprecated
token and generate a new one.
- Made some GET requests to the
/api-tokens/
list endpoint and saw that the
deprecated
field was included in the token resources. - Created some deprecated tokens and made sure they behave correctly and
appear with the notice in the API tokens page. - Ran JS unit tests.
- Ran
reviewboard/webapi/tests/test_api_token.py
Diff Revision 3
This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.
orig
1
2
3
4
5
Commits
reviewboard/accounts/forms/pages.py |
---|
reviewboard/static/rb/css/pages/my-account.less |
---|
reviewboard/static/rb/js/accountPrefsPage/views/apiTokensView.es6.js |
---|
reviewboard/static/rb/js/resources/models/apiTokenModel.es6.js |
---|
reviewboard/webapi/resources/api_token.py |
---|