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:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 20:58:53 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 11:51:17 +0300
commit71ccfde322b633e9245bee6acba1e64cb7640f19 (patch)
treee81b9d66257711bd9a3dd31d70d623b1a1927502 /app/views/projects/_last_push.html.haml
parent083b0a9b034a0e4004c012444f1a8811bd96ed29 (diff)
Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests within a project. So they need to be a allowed to create a branch and create a merge request.
Diffstat (limited to 'app/views/projects/_last_push.html.haml')
-rw-r--r--app/views/projects/_last_push.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml
index e9a8eae4375..f6d396c8127 100644
--- a/app/views/projects/_last_push.html.haml
+++ b/app/views/projects/_last_push.html.haml
@@ -13,7 +13,7 @@
#{time_ago_with_tooltip(event.created_at)}
- .flex-right
- - if can?(current_user, :create_merge_request_in, @project)
+ - if can?(current_user, :create_merge_request_in, event.project.default_merge_request_target)
+ .flex-right
= link_to new_mr_path_from_push_event(event), title: _("New merge request"), class: "btn btn-info btn-sm qa-create-merge-request" do
#{ _('Create merge request') }