Commit 6eff0eaa authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '339235-fj-use-group-linear-ancestor-scopes' into 'master'

Use Group linear ancestor scopes

See merge request gitlab-org/gitlab!70708
parents fcd59974 e2664d38
---
name: linear_ee_group_ancestor_scopes
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70708
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341350
milestone: '14.4'
type: development
group: group::access
default_enabled: false
...@@ -614,7 +614,13 @@ module EE ...@@ -614,7 +614,13 @@ module EE
end end
def invited_or_shared_group_members(groups) def invited_or_shared_group_members(groups)
::GroupMember.active_without_invites_and_requests.where(source_id: ::Gitlab::ObjectHierarchy.new(groups).base_and_ancestors) groups_and_ancestors = if ::Feature.enabled?(:linear_ee_group_ancestor_scopes, self, default_enabled: :yaml)
groups.self_and_ancestors
else
::Gitlab::ObjectHierarchy.new(groups).base_and_ancestors
end
::GroupMember.active_without_invites_and_requests.where(source_id: groups_and_ancestors)
end end
override :_safe_read_repository_read_only_column override :_safe_read_repository_read_only_column
......
This diff is collapsed.
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