Fix UX bug related to personal access token scopes

What does this MR do and why?

Fix UX bug related to personal access token scopes

In the user setting personal access token page, a scope is mandatory. Previously, it was possible to skip the frontend validation if the user selected a scope and then deselected. That resulted in a backend error.

Now, the frontend correctly detects if an scope has been chosen, under all possible interactions.

Changelog: fixed

References

None

Screenshots or screen recordings

Before After
Screen_Recording_2025-05-16_at_17.45.09 Screen_Recording_2025-05-20_at_12.38.10

How to set up and validate locally

  1. Enable this feature flag: https://gdk.test:3443/rails/features/migrate_user_access_tokens_ui
  2. Go to https://gdk.test:3443/-/user_settings/personal_access_tokens
  3. Play with the scopes

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

Merge request reports

Loading