Skip to content

AJAX creation of group/project/impersonation token

What does this MR do and why?

This MR silently enables group, project and impersonation token creation via AJAX. There is no visual impact.

initAccessTokenTableApp and initNewAccessTokenApp functions are fully covered by tests here:

https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/frontend/access_tokens/index_spec.js#L30-206

This is part of https://gitlab.com/gitlab-org/gitlab/-/issues/357848

How to set up and validate locally

The feature flag access_token_ajax should be enabled:

bin/rails console
Feature.enable(:access_token_ajax)
  1. Create a group access token: http://127.0.0.1:3000/groups/flightjs/-/settings/access_tokens
  2. Create a project access token: http://127.0.0.1:3000/flightjs/Flight/-/settings/access_tokens
  3. Create an impersonation access token: http://127.0.0.1:3000/admin/users/jacquiline.sanford/impersonation_tokens

The user should be able to create these types of tokens and he/she shouldn't observe no changes in the UI.

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 Eduardo Sanz García

Merge request reports