Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 21:06:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 21:06:24 +0300
commiteca3cd3a9e7d9ea680086cad8150050ec8cdef3f (patch)
treec3d262e0d8e721fc138c2d617f501fb09876f1b6 /lib/api
parent6e81d7f6283fae1b22f66b9d9b133243921cbd9e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/entities.rb2
-rw-r--r--lib/api/pages_domains.rb14
-rw-r--r--lib/api/settings.rb5
3 files changed, 16 insertions, 5 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 5aa16b117fd..9617f1a8acf 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1681,6 +1681,7 @@ module API
expose :verified?, as: :verified
expose :verification_code, as: :verification_code
expose :enabled_until
+ expose :auto_ssl_enabled
expose :certificate,
as: :certificate_expiration,
@@ -1696,6 +1697,7 @@ module API
expose :verified?, as: :verified
expose :verification_code, as: :verification_code
expose :enabled_until
+ expose :auto_ssl_enabled
expose :certificate,
if: ->(pages_domain, _) { pages_domain.certificate? },
diff --git a/lib/api/pages_domains.rb b/lib/api/pages_domains.rb
index ec2fe8270b7..2d02a4e624c 100644
--- a/lib/api/pages_domains.rb
+++ b/lib/api/pages_domains.rb
@@ -92,8 +92,10 @@ module API
requires :domain, type: String, desc: 'The domain'
# rubocop:disable Scalability/FileUploads
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/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
+ optional :certificate, types: [File, String], desc: 'The certificate', as: :user_provided_certificate
+ optional :key, types: [File, String], desc: 'The key', as: :user_provided_key
+ optional :auto_ssl_enabled, allow_blank: false, type: Boolean, default: false,
+ desc: "Enables automatic generation of SSL certificates issued by Let's Encrypt for custom domains."
# rubocop:enable Scalability/FileUploads
all_or_none_of :user_provided_certificate, :user_provided_key
end
@@ -116,14 +118,16 @@ module API
requires :domain, type: String, desc: 'The domain'
# rubocop:disable Scalability/FileUploads
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/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
+ optional :certificate, types: [File, String], desc: 'The certificate', as: :user_provided_certificate
+ optional :key, types: [File, String], desc: 'The key', as: :user_provided_key
+ optional :auto_ssl_enabled, allow_blank: true, type: Boolean,
+ desc: "Enables automatic generation of SSL certificates issued by Let's Encrypt for custom domains."
# rubocop:enable Scalability/FileUploads
end
put ":id/pages/domains/:domain", requirements: PAGES_DOMAINS_ENDPOINT_REQUIREMENTS do
authorize! :update_pages, user_project
- pages_domain_params = declared(params, include_parent_namespaces: false)
+ pages_domain_params = declared(params, include_parent_namespaces: false, include_missing: false)
# Remove empty private key if certificate is not empty.
if pages_domain_params[:user_provided_certificate] && !pages_domain_params[:user_provided_key]
diff --git a/lib/api/settings.rb b/lib/api/settings.rb
index 88076614f73..5362b3060c1 100644
--- a/lib/api/settings.rb
+++ b/lib/api/settings.rb
@@ -136,6 +136,11 @@ module API
optional :sign_in_text, type: String, desc: 'The sign in text of the GitLab application'
optional :signin_enabled, type: Boolean, desc: 'Flag indicating if password authentication is enabled for the web interface' # support legacy names, can be removed in v5
optional :signup_enabled, type: Boolean, desc: 'Flag indicating if sign up is enabled'
+ optional :sourcegraph_enabled, type: Boolean, desc: 'Enable Sourcegraph'
+ optional :sourcegraph_public_only, type: Boolean, desc: 'Only allow public projects to communicate with Sourcegraph'
+ given sourcegraph_enabled: ->(val) { val } do
+ requires :sourcegraph_url, type: String, desc: 'The configured Sourcegraph instance URL'
+ end
optional :terminal_max_session_time, type: Integer, desc: 'Maximum time for web terminal websocket connection (in seconds). Set to 0 for unlimited time.'
optional :usage_ping_enabled, type: Boolean, desc: 'Every week GitLab will report license usage back to GitLab, Inc.'
optional :instance_statistics_visibility_private, type: Boolean, desc: 'When set to `true` Instance statistics will only be available to admins'