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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-21 15:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-21 15:09:17 +0300
commit0c4570435d417b69efd433057f95f01810618837 (patch)
tree4e402832206b83da2d73671977c1e5f7cae9074a /app/services/groups
parent49abdb108a4d3c3f2ef9b27c7c4dcde43da1016a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups')
-rw-r--r--app/services/groups/participants_service.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/groups/participants_service.rb b/app/services/groups/participants_service.rb
index b6faf3fd9a5..575ae1236c2 100644
--- a/app/services/groups/participants_service.rb
+++ b/app/services/groups/participants_service.rb
@@ -2,6 +2,7 @@
module Groups
class ParticipantsService < Groups::BaseService
+ include Gitlab::Utils::StrongMemoize
include Users::ParticipableService
def execute(noteable)
@@ -29,7 +30,10 @@ module Groups
def group_members
return [] unless group
- @group_members ||= sorted(group.direct_and_indirect_users)
+ sorted(
+ group.direct_and_indirect_users(share_with_groups: group.member?(current_user))
+ )
end
+ strong_memoize_attr :group_members
end
end