summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-07-31 11:02:21 +0200
committerLukas Eipert <leipert@gitlab.com>2018-07-31 11:02:21 +0200
commit30aa901d8dda301c7a1af994301fa471a9fca2d3 (patch)
tree0965423f2bf9c9859b087ea278099b598b040249 /app/serializers
parent02e35a0d2630d6995652d67d32fb2462ae2f68b2 (diff)
downloadgitlab-ce-30aa901d8dda301c7a1af994301fa471a9fca2d3.tar.gz
ensure that merge request widget serializer exposes `can_create_issue`
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/merge_request_widget_entity.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb
index 4fe04e4b206..63fd9d63ec4 100644
--- a/app/serializers/merge_request_widget_entity.rb
+++ b/app/serializers/merge_request_widget_entity.rb
@@ -132,6 +132,10 @@ class MergeRequestWidgetEntity < IssuableEntity
can?(request.current_user, :create_note, merge_request)
end
+ expose :can_create_issue do |merge_request|
+ can?(current_user, :create_issue, merge_request.project)
+ end
+
expose :can_update do |merge_request|
can?(request.current_user, :update_merge_request, merge_request)
end