Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix API token expiration message. #1817

Merged

Conversation

aaronweeden
Copy link
Contributor

@aaronweeden aaronweeden commented Feb 5, 2024

Description

Currently, if someone has an expired API token, they see:
Screen Shot 2024-02-05 at 2 30 40 PM

Instead, they should see:
Screen Shot 2024-02-05 at 2 32 06 PM

There is already code to do this, but it was mistakenly using the creation date of the token rather than the current time to determine if a token is expired. This PR fixes it.

Tests performed

On my port on xdmod-dev:

  1. Before updating with the changes from this PR,
    1. Expire my current token manually in the database.
    2. Go to my XDMoD portal, click My Profile, and click API Token.
    3. Confirm it shows the wrong message.
  2. Update my port with the changes from this PR, and repeat the same steps, confirming that it shows the right message.
  3. Generate a new token, close the My Profile window, reopen it, and confirm the message is still correct.

Checklist:

  • The pull request description is suitable for a Changelog entry
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request

@aaronweeden aaronweeden added bug Bugfixes javascript Pull requests that update Javascript code Category: Data Analytics Framework labels Feb 5, 2024
@aaronweeden aaronweeden added this to the 11.0.0 milestone Feb 5, 2024
@aaronweeden aaronweeden merged commit 5d05c02 into ubccr:xdmod11.0 Feb 5, 2024
@aaronweeden aaronweeden deleted the fix-token-expiration-message branch May 7, 2024 21:12
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Bugfixes Category: Data Analytics Framework javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants