Gate secrets manager UI based on enrollment state
## Why are we doing this work When the user has opted in their groups/projects to the open beta of the secrets manager, either through enabling the instance level toggle for self-managed (https://gitlab.com/gitlab-org/gitlab/-/work_items/598060) or SaaS top level group (https://gitlab.com/gitlab-org/gitlab/-/work_items/598615), all secrets manager UI except for these toggles will now be gated by the enrollment or opt-in state of the group or project (instead of `secrets_manager` or `group_secrets_manager` feature flags). Implementing this will also make sure that we don't show the provisioning settings under user namespaces, since we should only show them for projects or groups under a group namespace. The UI that should be gated includes (for both groups and projects): - settings for provisioning the secrets manager - link in the navigation menu - the secrets manager page itself This does not include: - toggle for opting into the open beta on the instance level for self-managed - toggle for opting into the open beta on the for top-level groups for SaaS ## Relevant links ## Implementation plan These are all implemented on the Rails side. Replace checks for `secrets_manager` and `group_secrets_manager` feature flags with a check for the enrollment state instead. **Group** - `ee/app/views/groups/settings/_secret_manager.html.haml`: group settings for provisioning the secrets manager - `ee/lib/sidebars/groups/menus/security_compliance_menu.rb`: link in the navigation menu for groups - `ee/app/controllers/groups/secrets_controller.rb`: group secrets manager **Project** - `ee/app/helpers/ee/projects_helper.rb` (see `isSecretsManagerAvailable` in `project_permissions_panel_data`): project settings for provisioning the secrets manager - `ee/lib/ee/sidebars/projects/menus/security_compliance_menu.rb`: link in the navigation menu for projects - `ee/app/controllers/projects/secrets_controller.rb`: project secrets manager ## Verification steps 1. Upload a Premium license (or above). 2. [Set up openbao and enable the secrets manager](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/openbao.md) on your gdk. Make sure that the `secrets_manager` feature flag is disabled. 3. Enable the Open Beta feature flag (to be provided in https://gitlab.com/gitlab-org/gitlab/-/work_items/597896). 4. Go to your project settings (Settings \> General) and expand **Visibility, project features, permissions**. Verify that the secrets manager toggle does not exist. 5. Go to the Admin settings and enable the secrets manager open beta toggle. 6. Go back to the permissions settings of your project and verify that the secrets manager toggle is now available.
issue