Commit 97444930 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '341347-fj-remove-linear-members-finder-ancestors-ff' into 'master'

Enable linear MembersFinder ancestors queries

See merge request gitlab-org/gitlab!72592
parents 8e24a20c 9af3cdf1
......@@ -70,16 +70,11 @@ class MembersFinder
end
def project_invited_groups
invited_groups_and_ancestors = if ::Feature.enabled?(:linear_members_finder_ancestor_scopes, current_user, default_enabled: :yaml)
project.invited_groups
.self_and_ancestors
else
Gitlab::ObjectHierarchy
.new(project.invited_groups)
.base_and_ancestors
end
invited_groups_ids_including_ancestors = invited_groups_and_ancestors.public_or_visible_to_user(current_user).select(:id)
invited_groups_ids_including_ancestors = project
.invited_groups
.self_and_ancestors
.public_or_visible_to_user(current_user)
.select(:id)
GroupMember.with_source_id(invited_groups_ids_including_ancestors).non_minimal_access
end
......
---
name: linear_members_finder_ancestor_scopes
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70583
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341347
milestone: '14.4'
type: development
group: group::access
default_enabled: false
......@@ -202,13 +202,5 @@ RSpec.describe MembersFinder, '#execute' do
end
it_behaves_like 'with invited_groups param'
context 'when feature flag :linear_members_finder_ancestor_scopes is disabled' do
before do
stub_feature_flags(linear_members_finder_ancestor_scopes: false)
end
it_behaves_like 'with invited_groups param'
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment