Commit 52909f8b authored by Robert Speicher's avatar Robert Speicher

Add permission check to ReferenceExtractor's user mentions

parent b0ea7b3b
......@@ -32,7 +32,7 @@ module Gitlab
project.team.members.flatten
elsif namespace = Namespace.find_by(path: identifier)
if namespace.is_a?(Group)
namespace.users
namespace.users if can?(current_user, :read_group, namespace)
else
namespace.owner
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