Enable duo_admin_access_rules_subgroups by default
What does this MR do and why?
This MR enables the feature flag duo_admin_access_rules_subgroups by default. It changes default_enabled: false to default_enabled: true in ee/config/feature_flags/beta/duo_admin_access_rules_subgroups.yml. The flag stays type beta. Beta flags may be enabled by default under the feature flag lifecycle.
On GitLab Self-Managed and GitLab Dedicated, the instance administrator page Admin > GitLab Duo > Configuration has a section called "Restrict access based on group membership". The group picker there offered only top-level groups. With the flag on, the picker also lists subgroups, each shown with its full path. Only the picker is gated by this flag. The backend changes that shipped with the feature already apply for everyone regardless of the flag: accepting subgroup ids, rejecting non-group namespaces and duplicates, and showing subgroup rules that used to be hidden on the page.
GitLab.com does not use this page. The instance-level Duo configuration page is hidden on GitLab.com, so a GitLab.com rollout cannot exercise the feature. Self-Managed instances read default_enabled when they have no Flipper record for the flag. GitLab Dedicated does not support feature flags at all, so Dedicated tenants only get the feature once default_enabled is true, per enabling features on Dedicated. Enabling by default is the step that actually delivers the feature to customers.
The flag is kept rather than removed so administrators keep a kill switch. Running Feature.disable(:duo_admin_access_rules_subgroups) in the Rails console returns the picker to top-level groups only. Existing subgroup rules stay listed and enforced either way.
The feature was introduced in !255453 (merged), merged 2026-09-18, milestone 19.5. Documentation for the feature merged in !256195 (merged).
This MR also updates doc/administration/gitlab_duo/configure/access_control.md. The history entry for the feature now ends "Enabled by default." instead of "Disabled by default." Introduction and default-on both land in GitLab 19.5, so a single history entry is used rather than adding a separate "Enabled on GitLab Self-Managed and GitLab Dedicated in GitLab 19.5" line next to a "Disabled by default" entry for the same release. The body sentence that described both flag states, "If you enable the duo_admin_access_rules_subgroups feature flag, you can select any top-level group or subgroup. Otherwise, you can select only top-level groups.", is replaced with "You can select any top-level group or subgroup." The [!flag] alert stays because the flag still exists.
What does not change
- No production code changes.
- No spec changes. In RSpec an unstubbed flag is forced on regardless of
default_enabled, perspec/support/helpers/stubbed_feature.rb. Existingstub_feature_flags(duo_admin_access_rules_subgroups: false)blocks behave as before. - Nothing changes on GitLab.com.
- No database change, no migrations, no database review needed.
Review notes
- Approvals: backend maintainer approval is required for
ee/config/feature_flags/per.gitlab/CODEOWNERS. The Documentation Pages section is optional; the page lists @ashrafkhamis and @fneill as its technical writers. - Runtime consumers of the flag, both unchanged:
push_frontend_feature_flag(:duo_admin_access_rules_subgroups, :instance)inee/app/controllers/admin/gitlab_duo/configuration_controller.rband thetopLevelOnlyargument inee/app/assets/javascripts/ai/settings/components/group_selector.vue. - Live-instance verification https://gitlab.com/gitlab-org/gitlab/-/work_items/630255 (confidential) asks an administrator of a real Self-Managed instance to run the feature with the flag on. Not run yet. This MR can stay in Draft until it passes.
How to set up and validate locally
- Rails console:
Feature::Definition.get(:duo_admin_access_rules_subgroups).to_hshowstype: "beta"anddefault_enabled: true. - Rails console: run
Feature.remove(:duo_admin_access_rules_subgroups), thenFeature.enabled?(:duo_admin_access_rules_subgroups, :instance)returnstrueon this branch andfalseon master. - UI: as an administrator, in the upper-right corner select Admin. In the left sidebar select GitLab Duo, then select Change configuration. Under Restrict access based on group membership, select Add group. The dropdown lists subgroups with their full paths, without setting any flag.
Checks run locally:
spec/lib/feature/definition_spec.rb: 41 examples, 0 failures.ee/spec/requests/admin/gitlab_duo/configuration_controller_spec.rb: 12 examples, 0 failures.ee/spec/frontend/ai/settings/components/group_selector_spec.js: 29 tests passed.markdownlint-cli2on the docs page: 0 issues.vale --minAlertLevel suggestionon the docs page: 0 errors, 0 warnings.
References
- Rollout issue (confidential): https://gitlab.com/gitlab-org/gitlab/-/work_items/628453. Not closed by this MR; it closes when the flag is removed.
- Feature issue (confidential): https://gitlab.com/gitlab-org/gitlab/-/work_items/628450
- Epic (confidential): https://gitlab.com/groups/gitlab-org/-/work_items/23483
- Introduced by: !255453 (merged)
- Documentation: !256195 (merged)
MR acceptance checklist
This MR meets the definition of done.