Loading
Add organization settings toggle for the Policy Store experiment
What does this MR do and why?
Frontend half of the per-organization Policy Store opt-in — the settings toggle. Stacked on !251443 (merged) (the backend: setting, gating, and the policyStoreExperimentEnabled mutation argument); targets its branch so the diff shows only this change — retarget to master once it merges.
- Organization owners opt in from Settings > General > Policy Store — a new EE-only section (injected through
ee_else_ce+ a slot in the CE app, inside the search-settings root so section search keeps working) with a toggle that saves through thepolicyStoreExperimentEnabledargument onorganizationUpdate. The section renders only while the instance-wide gates pass. - Why a per-organization setting at all: confirmed with Alan — some customers do not allow experimental features and need an option to keep them disabled.
- The toggle is disabled while its mutation is in flight (no concurrent saves), reverts on error, and success/error alerts scroll into view since the section sits at the bottom of the page.
References
- Backend (stacked on): !251443 (merged)
- Group toggle hide (companion): !251231 (merged)
- Epic: https://gitlab.com/groups/gitlab-org/-/epics/22937
Screenshots or screen recordings
Recording (3x speed, GDK org first): Policy Store section on org general settings → toggle on → success alert → /o/first/-/security/policy_store loads with the existing policy → toggle off → the same page 404s and the nav item disappears → toggle back on.
How to set up and validate locally
- Enable
security_policies_v2and thepolicy_store_experiment_enabledapplication setting (Ultimate license). - Enable
ui_for_organizations— the/o/...organization UI (including the settings page with the new toggle) is behind this flag. curlan org policy store route —404 Not Found.- As an org owner, open Settings > General > Policy Store and turn on Enable the Policy Store experiment.
- The same route now answers, and
/o/<org>/-/security/policy_storerenders; toggling off returns it to 404.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Alexander Turinske