diff --git a/app/controllers/concerns/group_tree.rb b/app/controllers/concerns/group_tree.rb index 35c1f358a77a5a7d39eaf24fe77d6c36478bf5c0..e02a766d2b9a6c927a7a1639b2d62505eb2a1e1e 100644 --- a/app/controllers/concerns/group_tree.rb +++ b/app/controllers/concerns/group_tree.rb @@ -38,13 +38,7 @@ def filtered_groups_with_ancestors(groups) # # Pagination needs to be applied before loading the ancestors to # make sure ancestors are not cut off by pagination. - filtered_groups_relation = Group.where(id: filtered_groups.select(:id)) - - if Feature.enabled?(:linear_group_tree_ancestor_scopes, current_user, default_enabled: :yaml) - filtered_groups_relation.self_and_ancestors - else - Gitlab::ObjectHierarchy.new(filtered_groups_relation).base_and_ancestors - end + Group.where(id: filtered_groups.select(:id)).self_and_ancestors end # rubocop: enable CodeReuse/ActiveRecord end diff --git a/config/feature_flags/development/linear_group_tree_ancestor_scopes.yml b/config/feature_flags/development/linear_group_tree_ancestor_scopes.yml deleted file mode 100644 index 3a195242fa1f0065ba95d0d57dec065beae6e741..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/linear_group_tree_ancestor_scopes.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: linear_group_tree_ancestor_scopes -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70503 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341117 -milestone: '14.4' -type: development -group: group::access -default_enabled: false diff --git a/spec/controllers/concerns/group_tree_spec.rb b/spec/controllers/concerns/group_tree_spec.rb index e808f1caa6e2db80c04528a54799ceaf3147473a..921706b2042fb6c5b2be1a7225ef5d552aae81a0 100644 --- a/spec/controllers/concerns/group_tree_spec.rb +++ b/spec/controllers/concerns/group_tree_spec.rb @@ -102,13 +102,5 @@ def index end it_behaves_like 'returns filtered groups' - - context 'when feature flag :linear_group_tree_ancestor_scopes is disabled' do - before do - stub_feature_flags(linear_group_tree_ancestor_scopes: false) - end - - it_behaves_like 'returns filtered groups' - end end end