Skip to content

Split 'infrastructure' access_level from 'operations'

Pam Artiaga requested to merge pam/infrastructure-visibility-toggle into master

What does this MR do and why?

This MR contains backend changes for separating the visibility setting of Infrastructure from the Operations setting that is currently controlling it.

This change is behind the split_operations_visibility_permissions FF (introduced in !89089 (diffs)), which is disabled by default.

Related to #361587 (closed)

This will be rolled out with #364240 (closed)

Screenshots or screen recordings

split_operations_visibility_permissions feature flag is DISABLED

With the feature flag disabled, the visibility of the "Infrastructure" menu will depend on the operations_access_level regardless of the value of infrastructure_access_level

Operations OFF Operations ON
Infrastructure OFF ff-off_operations-off_infrastructure-off ff-off_operations-on_infrastructure-off
Infrastructure ON ff-off_operations-off_infrastructure-on ff-off_operations-on_infrastructure-on

split_operations_visibility_permissions feature flag is ENABLED

With the feature flag enabled, the visibility of the "Infrastructure" menu will depend on the infrastructure_access_level regardless of the value of operations_access_level

Infrastructure OFF Infrastructure ON
Operations OFF ff-on_infrastructure-off_operations-off ff-on_infrastructure-on_operations-off
Operations ON ff-on_infrastructure-off_operations-on ff-on_infrastructure-on_operations-on

How to set up and validate locally

  1. Choose a project in your local GitLab instance

    project = Project.find(<id>)
  2. Enable the split_operations_visibility_permissions feature flag:

    Feature.enable(:split_operations_visibility_permissions, project)
  3. Test setting:

    project.update(infrastructure_access_level: 'enabled')

    OR

    project.update(infrastructure_access_level: 'disabled')
  4. Test combining with the operations_access_level setting to make sure it will no longer affect the visibility of the "Infrastructure" menu item

    project.update(operations_access_level: 'disabled', infrastructure_access_level: 'enabled')

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 Pam Artiaga

Merge request reports

Loading