Fix issues with pages menu position experiment
This MR is urgent because it is blocking the below experiment that needs to be completed before the independently performed Navigation Redesign.
What does this MR do and why?
This MR fixes some identified issues with the Pages Menu Position Experiment:
- It updates the FF actor in
settings_menu.rb
that was incorrectly scoped toproject
instead ofcurrent_user
resulting in some users reporting not seeing any menu entry at all for Pages - It adds an access check to the deployments entry preventing users from seeing a menu entry if they are not allowed to access it. (In the settings menu, this problem doesn't exist because those users can't see the entire settings menu)
How to set up and validate locally
- Create or pick a project you have admin access to.
- Create a new user
- As the projects admin user, add the new user to the Project from Step 1, but give them the role
Developer
or below. - Log in as the new user, navigate to the project, and verify you cannot see "Pages" under "Settings", because "Settings" is not available (behavior to date)
- Still logged in as the new user, create a new project or open one you have admin access to, then confirm you can see "Pages" under "Settings"
- Enable the Feature Flag for the new user with
rails c
, thenFeature.enable(:show_pages_in_deployments_menu, User.find(<new User ID>))
- Still logged in as the new user, navigate to the project you have admin access to, confirm the "Pages" menu entry is now visible under "Deployments"
- Then navigate to the project from steps 1-4, and verify you cannot see the "Pages" menu entry under "Deployments"
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.
Edited by Janis Altherr