Skip to content
Snippets Groups Projects
Commit 4f97e13b authored by Thong Kuah's avatar Thong Kuah
Browse files

Merge branch 'mmj-simplify-query' into 'master'

Simplify query for `authorized_groups_without_shared_membership`

See merge request !122323



Merged-by: Thong Kuah's avatarThong Kuah <tkuah@gitlab.com>
Approved-by: Adam Hegyi's avatarAdam Hegyi <ahegyi@gitlab.com>
Approved-by: Thong Kuah's avatarThong Kuah <tkuah@gitlab.com>
Co-authored-by: default avatarManoj M J <mmj@gitlab.com>
parents 5a438bc1 3f86fa46
No related branches found
No related tags found
1 merge request!122323Simplify query for `authorized_groups_without_shared_membership`
Pipeline #890368120 passed
......@@ -2408,9 +2408,10 @@ def group_callouts_by_feature_name
def authorized_groups_without_shared_membership
Group.from_union(
[
groups.select(Namespace.default_select_columns),
authorized_projects.joins(:namespace).select(Namespace.default_select_columns)
])
groups,
Group.id_in(authorized_projects.select(:namespace_id))
]
)
end
def authorized_groups_with_shared_membership
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment