summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-06-21 12:06:12 +0000
committerNick Thomas <nick@gitlab.com>2019-06-21 12:06:12 +0000
commit6119d5ad7518f547af216d3bdc3d1fcffcfc9c71 (patch)
treecc1a1e74efb5e44bd5c5d152da85b7fed4ff2107 /app/services
parent176164d37423ffb39d293341799aff757f050d7c (diff)
downloadgitlab-ce-6119d5ad7518f547af216d3bdc3d1fcffcfc9c71.tar.gz
Don't show private keys for letsencrypt certs
Adds enum certificate_source to pages_domains table with default manually_uploaded Mark certificates as 'gitlab_provided' if the were obtained through Let's Encrypt Mark certificates as 'user_provided' if they were uploaded through controller or api Only show private key in domain edit form if it is 'user_provided' Only show LetsEncrypt option if is enabled by application settings (and feature flag) Refactor and fix some specs to match new logic Don't show Let's Encrypt certificates as well
Diffstat (limited to 'app/services')
-rw-r--r--app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb b/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb
index 2dfe1a3d8ca..3413a9e4612 100644
--- a/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb
+++ b/app/services/pages_domains/obtain_lets_encrypt_certificate_service.rb
@@ -35,7 +35,7 @@ module PagesDomains
def save_certificate(private_key, api_order)
certificate = api_order.certificate
- pages_domain.update!(key: private_key, certificate: certificate)
+ pages_domain.update!(gitlab_provided_key: private_key, gitlab_provided_certificate: certificate)
end
end
end