Skip to content

Project Setting: Add toggle to remove Security & Compliance left nav item (BE)

Why are we doing this work

In project settings, there are a number of left sidebar menu items that can be toggled off such as the repository, issues, and snippets; however, there are a number of items that cannot be toggled off which leads to a poor user experience if the project isn't ever going to utilize those features.

We should allow users to toggle off the Security & Compliance left nav item in Project Settings => General => Visibility, Project Features, and Permissions.

This issue represents the backend work required to deliver this feature. The frontend work is tracked in #224697 (closed).

Relevant links

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

  • Add a new column into project_features table
    • "security_dashboard_access_level integer DEFAULT 20 NOT NULL"
    • Add the model layer presence validation for the new column
  • Update project_permissions_settings helper method to serialize the recently introduced column value
  • Update project_feature_attributes method in projects controller to permit security_dashboard_access_level
  • Update the EE::ProjectPolicy to adhere the selected permission level
  • Update the InstanceSecurityDashboard#authorized_access_levels method to adhare the selected permission level
Edited by Mehmet Emin INAC