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

Fix mentioning of private groups.

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