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-07-19 09:09:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 09:09:23 +0300
commit37c57082df2119d2daa5dc37ca2a646a0031584d (patch)
treef985eda92a8a74e8d8209ae7ec321f357d03ed71 /app/services/groups
parent7b50347823ba6dcfaab59c2107282f4fc44c9a5d (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, 2 insertions, 4 deletions
diff --git a/app/services/groups/participants_service.rb b/app/services/groups/participants_service.rb
index 575ae1236c2..e939d27d464 100644
--- a/app/services/groups/participants_service.rb
+++ b/app/services/groups/participants_service.rb
@@ -21,10 +21,9 @@ module Groups
private
def all_members
- return [] if Feature.enabled?(:disable_all_mention)
+ return [] if group.nil? || Feature.enabled?(:disable_all_mention)
- count = group_members.count
- [{ username: "all", name: "All Group Members", count: count }]
+ [{ username: "all", name: "All Group Members", count: group.users_count }]
end
def group_members
@@ -34,6 +33,5 @@ module Groups
group.direct_and_indirect_users(share_with_groups: group.member?(current_user))
)
end
- strong_memoize_attr :group_members
end
end