diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-02-28 09:06:18 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-03-07 16:55:34 +0100 |
commit | e74879280f0cbf48fa0dcf8031e711cc51c9183f (patch) | |
tree | 291ec858063ba12d569b5a2810215d67b62195ac /app/serializers | |
parent | c9557ad711c6cdf4465fb8c3c9b0dbaffcafa0e8 (diff) | |
download | gitlab-ce-e74879280f0cbf48fa0dcf8031e711cc51c9183f.tar.gz |
Allow maintainers to edit directly in a fork
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/merge_request_widget_entity.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb index 89b49613a41..a39ddeeca88 100644 --- a/app/serializers/merge_request_widget_entity.rb +++ b/app/serializers/merge_request_widget_entity.rb @@ -30,6 +30,7 @@ class MergeRequestWidgetEntity < IssuableEntity expose :can_push_to_source_branch do |merge_request| presenter(merge_request).can_push_to_source_branch? end + expose :rebase_path do |merge_request| presenter(merge_request).rebase_path end @@ -137,7 +138,7 @@ class MergeRequestWidgetEntity < IssuableEntity end expose :new_blob_path do |merge_request| - if can?(current_user, :push_code, merge_request.project) + if presenter(merge_request).can_push_to_source_branch? project_new_blob_path(merge_request.project, merge_request.source_branch) end end |