2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

FIX: Avoid highlight mention to groups that are not public.

Follow-up to 3f50481188.
This commit is contained in:
Dan Ungureanu 2020-02-12 12:34:09 +02:00
parent ec40242b5c
commit 67c9940d72
No known key found for this signature in database
GPG key ID: 0AA2A00D6ACC8B84
2 changed files with 2 additions and 2 deletions

View file

@ -308,7 +308,7 @@ class UsersController < ApplicationController
groups = Group.where(name: usernames).pluck(:name)
mentionable_groups =
if current_user
Group.mentionable
Group.mentionable(current_user)
.where(name: usernames)
.pluck(:name, :user_count)
.map do |name, user_count|