summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorJan Beckmann <king-jan1999@hotmail.de>2019-03-08 08:34:20 +0000
committerSean McGivern <sean@gitlab.com>2019-03-08 08:34:20 +0000
commiteba4b9404f152f6ad8c4be62116cbe5fd0662b0d (patch)
treee2dd3ecdbf30d35eed819b5a6f71cd40f152b9d5 /app/views
parent6648188121ba8c044f104ff491a3b20a53167c64 (diff)
downloadgitlab-ce-eba4b9404f152f6ad8c4be62116cbe5fd0662b0d.tar.gz
Disallow reopening of locked merge requests
Fixes #56864
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/merge_requests/_mr_title.html.haml4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml
index 3cd83feb842..70011d58c8a 100644
--- a/app/views/projects/merge_requests/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/_mr_title.html.haml
@@ -1,4 +1,5 @@
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
+- can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request)
- if @merge_request.closed_without_fork?
.alert.alert-danger
@@ -33,10 +34,11 @@
- if can_update_merge_request
%li{ class: [merge_request_button_visibility(@merge_request, true), 'js-close-item'] }
= link_to 'Close', merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
+ - if can_reopen_merge_request
%li{ class: merge_request_button_visibility(@merge_request, false) }
= link_to 'Reopen', merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, class: 'reopen-mr-link', title: 'Reopen merge request'
- if can_update_merge_request
= link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-sm-none d-md-block btn btn-grouped js-issuable-edit qa-edit-button"
- = render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_update_merge_request
+ = render 'shared/issuable/close_reopen_button', issuable: @merge_request, can_update: can_update_merge_request, can_reopen: can_reopen_merge_request