Commit 98443467 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '281059-foss-master-failure-spec-finders-joined_groups_finder_spec-rb' into 'master'

[RUN AS-IF-FOSS] Resolve "FOSS master failure:  spec/finders/joined_groups_finder_spec.rb"

See merge request gitlab-org/gitlab!47360
parents 332ead95 4f19e4b6
......@@ -908,10 +908,12 @@ class User < ApplicationRecord
# Returns the groups a user has access to, either through a membership or a project authorization
def authorized_groups
if Feature.enabled?(:shared_group_membership_auth, self)
authorized_groups_with_shared_membership
else
authorized_groups_without_shared_membership
Group.unscoped do
if Feature.enabled?(:shared_group_membership_auth, self)
authorized_groups_with_shared_membership
else
authorized_groups_without_shared_membership
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