diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-27 21:09:16 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-12-27 21:09:16 +0000 |
commit | a97a2d27205637ea2ff6da112dabc1499c37ccfe (patch) | |
tree | b49b508683a5cc184e4fd010072baff4e0a82515 /app | |
parent | a52746649d1db4f52ae4e989dcf654ef4af57905 (diff) | |
parent | 9a0e16f4548bca25f6efc6cd7a4dd0af42b60042 (diff) | |
download | gitlab-ce-a97a2d27205637ea2ff6da112dabc1499c37ccfe.tar.gz |
Merge branch 'mention-all' into 'master'
Only allow group/project members to mention `@all`
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473
See merge request !2205
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/mentionable.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 2dab04f2a7c..3004722bce0 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -178,7 +178,7 @@ class ProjectsController < ApplicationController def markdown_preview text = params[:text] - ext = Gitlab::ReferenceExtractor.new(@project, current_user) + ext = Gitlab::ReferenceExtractor.new(@project, current_user, current_user) ext.analyze(text) render json: { diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index 1fdcda97520..6316ee208b5 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -44,7 +44,7 @@ module Mentionable end def all_references(current_user = self.author, text = nil) - ext = Gitlab::ReferenceExtractor.new(self.project, current_user) + ext = Gitlab::ReferenceExtractor.new(self.project, current_user, self.author) if text ext.analyze(text) |