summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-03-02 09:58:00 +0100
committerBob Van Landuyt <bob@vanlanduyt.co>2018-03-07 16:59:17 +0100
commit8b2ec23fefb469d4a8f986e140aa13e20d73e210 (patch)
treedfd71c1b7d9703a6278b77523817eeace6a9d427 /lib/api/entities.rb
parente74879280f0cbf48fa0dcf8031e711cc51c9183f (diff)
downloadgitlab-ce-8b2ec23fefb469d4a8f986e140aa13e20d73e210.tar.gz
Set `allow_maintainer_to_push` using the API
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 4555184095c..16147ee90c9 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -547,6 +547,7 @@ module API
expose :discussion_locked
expose :should_remove_source_branch?, as: :should_remove_source_branch
expose :force_remove_source_branch?, as: :force_remove_source_branch
+ expose :allow_maintainer_to_push, if: -> (merge_request, _) { merge_request.for_fork? }
expose :web_url do |merge_request, options|
Gitlab::UrlBuilder.build(merge_request)