Skip to content

Fix display of times in access token and deploy token tables

Reuben Pereira requested to merge 336230-fix-pat-expires-time-display into master

What does this MR do?

The expires column value was always being displayed in relative format. This MR changes it to respect the User#time_display_relative setting added in !65570 (merged).

To test:

  1. Go to Edit Profile > preferences and disable the "Use relative times" setting.
  2. Deploy tokens
    1. Go to a project's Settings > Repository > Deploy tokens.
    2. Create a token with an expiry time.
  3. Personal access tokens
    1. Go to User profile > Access Tokens
    2. Create a token with an expiry time.

Screenshots or Screencasts (strongly suggested)

Personal access tokens Deploy tokens
Relative time display - Before pat_relative_before deploy_tokens_relative_before
Relative time display - After pat_relative_after deploy_tokens_relative_after
Absolute time display - Before pat_before deploy_tokens_before
Absolute time display - After pat_after deploy_tokens_after

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #336230 (closed)

Edited by Reuben Pereira

Merge request reports