summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-12-11 16:06:17 +0100
committerZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-12-11 16:06:17 +0100
commit5983e9bdf2aebb455aa7395541bb9d93d6d4de38 (patch)
tree6456197015b7d96efe8586eb7ae202292c3b3a48 /app
parenteaecd39726701594c7b4f77ff2eec203b68c947c (diff)
downloadgitlab-ce-5983e9bdf2aebb455aa7395541bb9d93d6d4de38.tar.gz
Minor fix in flow 'Merge when build succeeds'
When a user, which is not the merge user, want to removes the source branch after the automatic merge this might fail because of checks in the DeleteBranchService
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml
index 08af124274b..2168294c683 100644
--- a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml
+++ b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml
@@ -12,7 +12,7 @@
- else
The source branch will not be removed.
- - remove_source_branch_button = @merge_request.can_remove_source_branch?(current_user) && !should_remove_source_branch
+ - remove_source_branch_button = @merge_request.can_remove_source_branch?(current_user) && !should_remove_source_branch && @merge_request.merge_user == current_user
- user_can_cancel_automatic_merge = @merge_request.can_cancel_merge_when_build_succeeds?(current_user)
- if remove_source_branch_button || user_can_cancel_automatic_merge
.clearfix.prepend-top-10