Commit 2ff8b931 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '7038-create-issue-regression' into 'master'

CE-Port of gitlab-ee!6708

Closes gitlab-ee#7038

See merge request gitlab-org/gitlab-ce!20917
parents 02e35a0d 30aa901d
...@@ -132,6 +132,10 @@ class MergeRequestWidgetEntity < IssuableEntity ...@@ -132,6 +132,10 @@ class MergeRequestWidgetEntity < IssuableEntity
can?(request.current_user, :create_note, merge_request) can?(request.current_user, :create_note, merge_request)
end end
expose :can_create_issue do |merge_request|
can?(current_user, :create_issue, merge_request.project)
end
expose :can_update do |merge_request| expose :can_update do |merge_request|
can?(request.current_user, :update_merge_request, merge_request) can?(request.current_user, :update_merge_request, merge_request)
end end
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
"can_revert_on_current_merge_request": { "type": ["boolean", "null"] }, "can_revert_on_current_merge_request": { "type": ["boolean", "null"] },
"can_cherry_pick_on_current_merge_request": { "type": ["boolean", "null"] }, "can_cherry_pick_on_current_merge_request": { "type": ["boolean", "null"] },
"can_create_note": { "type": "boolean" }, "can_create_note": { "type": "boolean" },
"can_create_issue": { "type": "boolean" },
"can_update": { "type": "boolean" } "can_update": { "type": "boolean" }
}, },
"additionalProperties": false "additionalProperties": false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment