Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-27 14:19:48 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-02 11:57:01 +0300
commit65bb0c34066eef77647e1d60e6bac7a12993cd93 (patch)
tree7928449705a3d02752c506652eaad7b5e3d5fdfd /lib/gitlab/closing_issue_extractor.rb
parente62b5a2b072eb1bc8587b095e906bd194475eacc (diff)
Only allow users to cross-reference and close issues they have access to.
Diffstat (limited to 'lib/gitlab/closing_issue_extractor.rb')
-rw-r--r--lib/gitlab/closing_issue_extractor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/closing_issue_extractor.rb b/lib/gitlab/closing_issue_extractor.rb
index 5643d60c807..6425193d85f 100644
--- a/lib/gitlab/closing_issue_extractor.rb
+++ b/lib/gitlab/closing_issue_extractor.rb
@@ -2,14 +2,14 @@ module Gitlab
module ClosingIssueExtractor
ISSUE_CLOSING_REGEX = Regexp.new(Gitlab.config.gitlab.issue_closing_pattern)
- def self.closed_by_message_in_project(message, project)
+ def self.closed_by_message_in_project(message, project, current_user = nil)
issues = []
unless message.nil?
md = message.scan(ISSUE_CLOSING_REGEX)
md.each do |ref|
- extractor = Gitlab::ReferenceExtractor.new(project)
+ extractor = Gitlab::ReferenceExtractor.new(project, current_user)
extractor.analyze(ref[0])
issues += extractor.issues
end