Skip to content

Add group level access token UI

Fabio Huser requested to merge siemens/gitlab:feat/group-access-token-ui into master

What does this MR do and why?

Follow up to !77236 (merged). Closes #214045 (closed). Also closes #333094 (closed)

This MR introduces a new group settings page, which allows the creation of Group Access Tokens, analog to the Project Access Token one. Group Access Tokens can already be created by instance administrators (self-hosted) and via API.

As part of this, the documentation was separated into individual Project/Group Access Token pages, shared controller logic extracted into a common concern and common test specs extracted into shared examples.

Screenshots or screen recordings

Group Access Token Settings Page Active Group Access Token Table Resource Access Token Enable/Disable Configuration
image image image

How to set up and validate locally

  1. Use the current branch (e.g. via GDK) and navigate to an existing or new group (e.g. /my-group) with the visibility private.
  2. Open the Group Access Token page via the side-menu Settings > Access Tokens.
  3. Create a new Group Access Token with a test name (e.g. Example Token) and test scope (e.g. read_api).
  4. Click the Create group access token button.
  5. Use the newly created access token to query the group API of the target group, e.g curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/{GROUP_ID}".
  6. This will return all details of the existing/newly created private group.
  7. Click the Revoke button on the Group Access Token page for the newly created access token.
  8. The Group Access Token page should now display no 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 Fabio Huser

Merge request reports