Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
21a05328
Commit
21a05328
authored
Mar 03, 2016
by
Valery Sizov
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Security: Fix issue auto closing
parent
cb6af816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/services/git_push_service.rb
app/services/git_push_service.rb
+3
-1
app/services/merge_requests/post_merge_service.rb
app/services/merge_requests/post_merge_service.rb
+3
-1
No files found.
app/services/git_push_service.rb
View file @
21a05328
...
...
@@ -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
...
...
app/services/merge_requests/post_merge_service.rb
View file @
21a05328
...
...
@@ -21,7 +21,9 @@ module MergeRequests
closed_issues
=
merge_request
.
closes_issues
(
current_user
)
closed_issues
.
each
do
|
issue
|
Issues
::
CloseService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
,
merge_request
)
if
can?
(
current_user
,
:update_issue
,
issue
)
Issues
::
CloseService
.
new
(
project
,
current_user
,
{}).
execute
(
issue
,
merge_request
)
end
end
end
...
...
Kazuhiko Shiozaki
@kazuhiko
mentioned in commit
96d35c59
·
Mar 25, 2016
mentioned in commit
96d35c59
mentioned in commit 96d35c5975fe8c5ff0a6306b8da5a623cfcb47b6
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment