Personal access tokens table with new UI

What does this MR do and why?

  • Personal access tokens table with new UI
  • Integrate the table with GraphQL to render both legacy and granular tokens
  • Change is behind the granular_personal_access_tokens feature flag

References

Screenshots or screen recordings

Before After
Screenshot_2025-11-26_at_12.55.04_pm Screenshot_2025-11-26_at_1.00.00_pm

How to set up and validate locally

  1. Generate two tokens using the rails console:
PersonalAccessTokens::CreateService.new(
  current_user: <USER>,
  target_user: <USER>,
  organization_id: <USER>.organization_id,
  params: { expires_at: 1.month.from_now, scopes: ['api'], granular: false, name: 'Legacy token', description: 'This is a legacy token' }
)

PersonalAccessTokens::CreateService.new(
  current_user: <USER>,
  target_user: <USER>,
  organization_id: <USER>.organization_id,
  params: { expires_at: 1.month.from_now, scopes: ['granular'], granular: true, name: 'Granular token', description: 'This is a granular token' }
)
  1. Navigate to Preferences > Personal access tokens. You should see the current personal access tokens table
  2. Enable the feature flag granular_personal_access_tokens and refresh the page (you might have to restart GDK). You should see the new UI for the personal access tokens table.

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.

Related to #581464

Edited by Hinam Mehra

Merge request reports

Loading