diff --git a/app/models/group.rb b/app/models/group.rb index 4b87528d6e8aef2c1d0425e2e55a85bb409d83de..15eb2ee81a64bcaf96baa5b5b6b0295f9ff0ec58 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -194,13 +194,8 @@ def preset_root_ancestor_for(groups) def ids_with_disabled_email(groups) inner_groups = Group.where('id = namespaces_with_emails_disabled.id') - inner_ancestors = if Feature.enabled?(:linear_group_ancestor_scopes, default_enabled: :yaml) - inner_groups.self_and_ancestors - else - Gitlab::ObjectHierarchy.new(inner_groups).base_and_ancestors - end - - inner_query = inner_ancestors + inner_query = inner_groups + .self_and_ancestors .where(emails_disabled: true) .select('1') .limit(1) diff --git a/config/feature_flags/development/linear_group_ancestor_scopes.yml b/config/feature_flags/development/linear_group_ancestor_scopes.yml deleted file mode 100644 index f23399c1e6ff81ccb6aef97731d7e231b57ba9ea..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/linear_group_ancestor_scopes.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: linear_group_ancestor_scopes -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70495 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341115 -milestone: '14.4' -type: development -group: group::access -default_enabled: false diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index ce0442f27a35f4c83bc2dd0ef81efcf6e6cbd106..c326b2d6fcd63fe3500ebe0ee0a00aa2d4423a81 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -2648,14 +2648,6 @@ def setup_group_members(group) end it_behaves_like 'returns namespaces with disabled email' - - context 'when feature flag :linear_group_ancestor_scopes is disabled' do - before do - stub_feature_flags(linear_group_ancestor_scopes: false) - end - - it_behaves_like 'returns namespaces with disabled email' - end end describe '.timelogs' do