diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-14 14:15:13 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-14 14:15:13 +0300 |
commit | 77dc71d5502eb83299b92ea065ec90a420a7e3d3 (patch) | |
tree | f1ba0696ca931a48fc5382225e67556fb15a30df /app | |
parent | 910794bae5a91479f41468ebc345db680a33b20e (diff) |
Fix mentioning of private groups.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/mentionable.rb | 4 | ||||
-rw-r--r-- | app/models/concerns/participable.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index a5957391bb7..b7c39df885d 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -42,10 +42,10 @@ module Mentionable 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 diff --git a/app/models/concerns/participable.rb b/app/models/concerns/participable.rb index 7a5e4876ff2..a4832204f7b 100644 --- a/app/models/concerns/participable.rb +++ b/app/models/concerns/participable.rb @@ -40,7 +40,7 @@ module Participable meth = method(attr) value = - if meth.arity == 1 + if meth.arity == 1 || meth.arity == -1 meth.call(current_user) else meth.call |