diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2019-09-10 16:24:10 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-09-10 16:24:10 +0000 |
commit | daf7810e2ee323e39e3cc0b1c6f3fe15a9977a14 (patch) | |
tree | ad30eb329787116653940d22a95cad1e99ebb0ab /lib/api/pages_domains.rb | |
parent | 0078ea44c292cd0e5eb7f4ae52358087c8ee34db (diff) | |
download | gitlab-ce-daf7810e2ee323e39e3cc0b1c6f3fe15a9977a14.tar.gz |
Add Scalability/FileUploads cop
This cop prevents you from using file in API, it points you to the
development documentation about workhorse file acceleration.
Diffstat (limited to 'lib/api/pages_domains.rb')
-rw-r--r-- | lib/api/pages_domains.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/pages_domains.rb b/lib/api/pages_domains.rb index 4227a106a95..40b133e8959 100644 --- a/lib/api/pages_domains.rb +++ b/lib/api/pages_domains.rb @@ -90,8 +90,11 @@ module API end params do requires :domain, type: String, desc: 'The domain' + # rubocop:disable Scalability/FileUploads + # TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab-ee/issues/14960 optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate', as: :user_provided_certificate optional :key, allow_blank: false, types: [File, String], desc: 'The key', as: :user_provided_key + # rubocop:enable Scalability/FileUploads all_or_none_of :user_provided_certificate, :user_provided_key end post ":id/pages/domains" do @@ -111,8 +114,11 @@ module API desc 'Updates a pages domain' params do requires :domain, type: String, desc: 'The domain' + # rubocop:disable Scalability/FileUploads + # TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab-ee/issues/14960 optional :certificate, allow_blank: false, types: [File, String], desc: 'The certificate', as: :user_provided_certificate optional :key, allow_blank: false, types: [File, String], desc: 'The key', as: :user_provided_key + # rubocop:enable Scalability/FileUploads end put ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do authorize! :update_pages, user_project |