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:
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:
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.
- Go to any group ->
Settings
->Roles and Permissions
. Verify that the table shows without a group selector dropdown. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #425535 (closed)