Commit 4f19e4b6 authored by Alex Pooley's avatar Alex Pooley

Resume unscoped user's authorized groups query

parent cf36f02d
...@@ -908,12 +908,14 @@ class User < ApplicationRecord ...@@ -908,12 +908,14 @@ class User < ApplicationRecord
# Returns the groups a user has access to, either through a membership or a project authorization # Returns the groups a user has access to, either through a membership or a project authorization
def authorized_groups def authorized_groups
Group.unscoped do
if Feature.enabled?(:shared_group_membership_auth, self) if Feature.enabled?(:shared_group_membership_auth, self)
authorized_groups_with_shared_membership authorized_groups_with_shared_membership
else else
authorized_groups_without_shared_membership authorized_groups_without_shared_membership
end end
end end
end
# Returns the groups a user is a member of, either directly or through a parent group # Returns the groups a user is a member of, either directly or through a parent group
def membership_groups def membership_groups
......
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