Skip to content

Add conditional access role options to access tokens view

What does this MR do and why?

Making the access token dropdown in the UI change based on the current user's ability to manage different roles.

  • For Maintainers, the dropdown should only show Guest, Reporter, Developer, Maintainer
  • For Owners, the dropdown should also show Owner

Screenshots or screen recordings

As an owner:

Before

image

After

image

As a maintainer:

Before

image

After

image

How to set up and validate locally

  • As a Maintainer, go to a project's access tokens settings page (e.g. https://gdk.test:3443/mygroup/myproject/-/settings/access_tokens)
    • See the dropdown does not contain Owner
  • As an Owner, view the same page
    • See the dropdown contains Owner

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Sort of related to #21432 (closed)

Edited by charlie ablett

Merge request reports