Hide roles and permissions page from admin area when in SaaS mode
What does this MR do and why?
- When SaaS mode is on, an admin cannot configure instance-level custom roles. However, we will render the
Roles and Permissions
item in theSettings
menu and render the page only with an error message. - This MR hides the menu from the sidebar and renders a 404 if SaaS mode is on.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Context | Before | After |
---|---|---|
Page | ||
Sidebar |
How to set up and validate locally
- Turn on SaaS mode with:
export GITLAB_SIMULATE_SAAS=1
gdk restart
-
Log-in as admin and navigate to
/admin/application_settings/roles_and_permissions
. This should result in a 404. You should also not see anyRoles and Permissions
item in theSettings
menu. -
Turn off SaaS mode with:
export GITLAB_SIMULATE_SAAS=0
gdk restart
- Refresh the page. You should see
/admin/application_settings/roles_and_permissions
and see a menu-item for it in the sidebar underSettings
.
Related to #442296 (closed)
Edited by Hinam Mehra