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_tokensfeature flag
References
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
How to set up and validate locally
- 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' }
)
- Navigate to
Preferences > Personal access tokens. You should see the current personal access tokens table - Enable the feature flag
granular_personal_access_tokensand 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

