Add group level access token UI
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 |
---|---|---|
How to set up and validate locally
- Use the current branch (e.g. via GDK) and navigate to an existing or new group (e.g.
/my-group
) with the visibilityprivate
. - Open the Group Access Token page via the side-menu Settings > Access Tokens.
- Create a new Group Access Token with a test name (e.g.
Example Token
) and test scope (e.g.read_api
). - Click the
Create group access token
button. - 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}"
. - This will return all details of the existing/newly created private group.
- Click the
Revoke
button on the Group Access Token page for the newly created access token. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Fabio Huser