Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 9516d162066..03d2b5d19ba 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -2408,9 +2408,10 @@ class User < ApplicationRecord
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