Skip to content

Add "Manage deploy tokens" custom permission

Alex Buijs requested to merge add-manage_deploy_tokens-custom-permission into master

What does this MR do and why?

This MR adds Manage deploy tokens as a customizable permission, so that it can be added onto any base role.

This makes managing deploy tokens on group and/or project level available to all roles, as the Owner role might have too many privileges for all use cases.

issue: #448843 (closed)

Screenshots or screen recordings

Group member with custom role Project member with custom role
Screenshot_2024-05-07_at_14.51.44 Screenshot_2024-05-07_at_14.52.28

How to set up and validate locally

As admin:

  1. Create a group and apply the Ultimate license to the group
  2. If SaaS mode is:
  3. Invite a user to the group and assign the new custom role to the user

As group member with the custom role:

  1. Visit http://localhost:3000/groups/${new_group}/-/settings/repository and verify the page is accessible and you can view, add and revoke tokens.
  2. Verify you can view add and revoke tokens via the deploy tokens API.

As admin:

  1. Create a project in the group
  2. Invite another user to the project and assign the new custom role to the user

As project member with the custom role:

  1. Visit http://localhost:3000/{new_group}/{new_project}/-/settings/repository and verify the page is accessible and you can view, add and revoke tokens.
  2. Verify you can view add and revoke tokens via the deploy tokens API.
Edited by Alex Buijs

Merge request reports