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
diff options
context:
space:
mode:
authorVladimir Shushlin <v.shushlin@gmail.com>2019-06-13 14:37:45 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2019-06-25 11:30:12 +0300
commit432f2bbc9cf64d53418c1eb9bb701254803a0e1e (patch)
tree6f93c0b6ecafcdcf7ca7f76d48b7a5afa2319204 /lib/gitlab/lets_encrypt
parent3115c9fc121743dea29aa92a603a0c782eb3d75b (diff)
Use project depended feature flag for pages ssl
Also add ::Gitlab::LetsEncrypt.enabled? shortcut and simplify it a lot
Diffstat (limited to 'lib/gitlab/lets_encrypt')
-rw-r--r--lib/gitlab/lets_encrypt/client.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/gitlab/lets_encrypt/client.rb b/lib/gitlab/lets_encrypt/client.rb
index 66aea137012..ad2921ed555 100644
--- a/lib/gitlab/lets_encrypt/client.rb
+++ b/lib/gitlab/lets_encrypt/client.rb
@@ -34,14 +34,6 @@ module Gitlab
acme_client.terms_of_service
end
- def enabled?
- return false unless Feature.enabled?(:pages_auto_ssl)
-
- return false unless private_key
-
- Gitlab::CurrentSettings.lets_encrypt_terms_of_service_accepted
- end
-
private
def acme_client
@@ -65,7 +57,7 @@ module Gitlab
end
def ensure_account
- raise 'Acme integration is disabled' unless enabled?
+ raise 'Acme integration is disabled' unless ::Gitlab::LetsEncrypt.enabled?
@acme_account ||= acme_client.new_account(contact: contact, terms_of_service_agreed: true)
end