Fix calculation for expiring token badges
What does this MR do and why?
Fix calculation for tagging expiring tokens
In the vue_shared access tokens components, we should tag tokens that
are expiring if the expiration happens in less or equal than two
weeks (0-14 days, both included). However, currently tokens are tagged if the expiration is
less than to weeks. We correct here this one-day offset.
Changelog: fixed
References
Screenshots or screen recordings
No changes except the expiring badge.
How to set up and validate locally
- Enable the migrate_user_access_tokens_ui feature flag.
- Go to https://gdk.test:3443/-/user_settings/personal_access_tokens
- Create a token with an expiry day of 15 days in the future. It should have an
activebadge. - Create a token with an expiry day of 14 days in the future. It should have an
expiringbadge and it should be listed in theTokens expiring in 2 weekscard.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Eduardo Sanz García
