summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-05-17 13:49:02 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-05-17 13:49:02 +0000
commit433070dc954e40c4fffdb6e675163a74290420ec (patch)
tree6727863b57f86197c4992104767e997793b06d9e /app/serializers
parentb957df95f72f194d7d2dd9468c2fe9368c8dc755 (diff)
parent48a4a934c47dbfd43e03aa61e177c936b0d8d016 (diff)
downloadgitlab-ce-433070dc954e40c4fffdb6e675163a74290420ec.tar.gz
Merge branch 'acet-mr-widget-nothing-to-commit-state' into 'master'
MRWidget: Implement new design for nothing to commit state. Closes #29320 See merge request !11266
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/merge_request_entity.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/merge_request_entity.rb b/app/serializers/merge_request_entity.rb
index a2542c54f7a..a49f4d834cd 100644
--- a/app/serializers/merge_request_entity.rb
+++ b/app/serializers/merge_request_entity.rb
@@ -97,6 +97,14 @@ class MergeRequestEntity < IssuableEntity
presenter(merge_request).target_branch_commits_path
end
+ expose :new_blob_path do |merge_request|
+ if can?(current_user, :push_code, merge_request.project)
+ namespace_project_new_blob_path(merge_request.project.namespace,
+ merge_request.project,
+ merge_request.source_branch)
+ end
+ end
+
expose :conflict_resolution_path do |merge_request|
presenter(merge_request).conflict_resolution_path
end