summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-27 12:19:48 +0100
committerDouwe Maan <douwe@gitlab.com>2015-04-02 10:57:01 +0200
commit65bb0c34066eef77647e1d60e6bac7a12993cd93 (patch)
tree7928449705a3d02752c506652eaad7b5e3d5fdfd /app/models/commit.rb
parente62b5a2b072eb1bc8587b095e906bd194475eacc (diff)
downloadgitlab-ce-65bb0c34066eef77647e1d60e6bac7a12993cd93.tar.gz
Only allow users to cross-reference and close issues they have access to.
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 481300171be..084cf420079 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -117,8 +117,8 @@ class Commit
# Discover issues should be closed when this commit is pushed to a project's
# default branch.
- def closes_issues(project)
- Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project)
+ def closes_issues(project, current_user = self.committer)
+ Gitlab::ClosingIssueExtractor.closed_by_message_in_project(safe_message, project, current_user)
end
# Mentionable override.