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:
authorValery Sizov <vsv2711@gmail.com>2016-03-03 16:19:27 +0300
committerValery Sizov <vsv2711@gmail.com>2016-03-03 17:42:44 +0300
commit21a05328ffd5cb9130ae516faa7dd672cacba90c (patch)
treed1ffe737cac070e502e15f465cea488c6c9c3b89 /app/services/git_push_service.rb
parentcb6af816707571317d8cdaf4a6df20db23512398 (diff)
Security: Fix issue auto closing
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 9ba200f7bde..b50a7a4217c 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -96,7 +96,9 @@ class GitPushService < BaseService
# a different branch.
closed_issues = commit.closes_issues(current_user)
closed_issues.each do |issue|
- Issues::CloseService.new(project, authors[commit], {}).execute(issue, commit)
+ if can?(current_user, :update_issue, issue)
+ Issues::CloseService.new(project, authors[commit], {}).execute(issue, commit)
+ end
end
end