Commit 77dc71d5 authored by Douwe Maan's avatar Douwe Maan

Fix mentioning of private groups.

parent 910794ba
......@@ -42,10 +42,10 @@ def has_mentioned?(target)
SystemNoteService.cross_reference_exists?(target, local_reference)
end
def mentioned_users(current_user = nil, p = project)
def mentioned_users(current_user = nil)
return [] if mentionable_text.blank?
ext = Gitlab::ReferenceExtractor.new(p, current_user)
ext = Gitlab::ReferenceExtractor.new(self.project, current_user)
ext.analyze(mentionable_text)
ext.users.uniq
end
......
......@@ -40,7 +40,7 @@ def participants(current_user = self.author)
meth = method(attr)
value =
if meth.arity == 1
if meth.arity == 1 || meth.arity == -1
meth.call(current_user)
else
meth.call
......
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