Skip to content

Combine RoleAndPermissionsSaas and RoleAndPermissionsSelfManaged to one

What does this MR do and why?

On the Roles and Permissions page, there's a Vue component that shows the roles and permissions:

ksnip_20231030-144328

The top-level component is either RoleAndPermissionsSaas.vue or RoleAndPermissionsSelfManaged.vue, depending on if the Roles and Permissions page is viewed through the group settings or admin settings. However, despite the names, whether GitLab is running in SAAS mode or not doesn't matter; RoleAndPermissionsSaas.vue is always used for the group view, and RoleAndPermissionsSelfManaged.vue is always used for the admin view.

Also, both components do exactly the same thing, except that RoleAndPermissionsSelfManaged.vue shows a group selector dropdown that RoleAndPermissionsSass.vue doesn't:

ksnip_20231030-144756

This MR refactors the code and combines the two components into a single one that selectively shows the group selector dropdown, depending on which level it's on (group or admin).

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Go to any group -> Settings -> Roles and Permissions. Verify that the table shows without a group selector dropdown.
  2. Go to admin -> Settings -> Roles and Permission. Verify that the table shows with a group selector dropdown.

MR acceptance checklist

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

Related to #425535 (closed)

Edited by Daniel Tian

Merge request reports

Loading