Skip to content

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:

  1. It updates the FF actor in settings_menu.rb that was incorrectly scoped to project instead of current_user resulting in some users reporting not seeing any menu entry at all for Pages
  2. 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

  1. Create or pick a project you have admin access to.
  2. Create a new user
  3. As the projects admin user, add the new user to the Project from Step 1, but give them the role Developer or below.
  4. 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)
  5. 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"
  6. Enable the Feature Flag for the new user with rails c, then Feature.enable(:show_pages_in_deployments_menu, User.find(<new User ID>))
  7. 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"
  8. 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.

Edited by Janis Altherr

Merge request reports