Skip to content

Update maximum allowable lifetime message for PAT

What does this MR do and why?

Related to #350094 (closed)

Admins can set the maximum allowable lifetime for personal access tokens in the Admin Area. See http://gdk.peterhegman.com:3000/help/user/admin_area/settings/account_and_limit_settings#limit-the-lifetime-of-personal-access-tokens

When this setting is active there is a message displayed in the personal access token form. This MR changes the copy and styling of this message. It also disables all of the invalid dates in the datepicker so you can't pick a date that violates this setting.

Screenshots or screen recordings

header After
Screen_Shot_2022-03-02_at_3.39.52_PM Screen_Shot_2022-03-02_at_3.37.23_PM
Screen_Shot_2022-03-02_at_3.40.07_PM Screen_Shot_2022-03-02_at_3.34.08_PM

How to set up and validate locally

Testing this feature requires a GitLab Ultimate license

  1. Sign in as an Admin
  2. Set a value for the Maximum allowable lifetime for personal access token (days) setting in /admin/application_settings/general#js-account-settings
  3. Navigate to /-/profile/personal_access_tokens

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports