diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
commit | 72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 (patch) | |
tree | 2e81b28a062212375bf17d1da0ff836d6b021469 /app/models/pages_domain.rb | |
parent | 9db503ef9888c984b287af44d009d884e835ce04 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/pages_domain.rb')
-rw-r--r-- | app/models/pages_domain.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb index dd2cafd9a35..330764ebc7f 100644 --- a/app/models/pages_domain.rb +++ b/app/models/pages_domain.rb @@ -6,7 +6,8 @@ class PagesDomain < ApplicationRecord SSL_RENEWAL_THRESHOLD = 30.days.freeze enum certificate_source: { user_provided: 0, gitlab_provided: 1 }, _prefix: :certificate - enum domain_type: { instance: 0, group: 1, project: 2 }, _prefix: :domain_type + enum scope: { instance: 0, group: 1, project: 2 }, _prefix: :scope + enum usage: { pages: 0, serverless: 1 }, _prefix: :usage belongs_to :project has_many :acme_orders, class_name: "PagesDomainAcmeOrder" @@ -26,8 +27,9 @@ class PagesDomain < ApplicationRecord validate :validate_intermediates, if: ->(domain) { domain.certificate.present? && domain.certificate_changed? } default_value_for(:auto_ssl_enabled, allow_nil: false) { ::Gitlab::LetsEncrypt.enabled? } - default_value_for :domain_type, allow_nil: false, value: :project + default_value_for :scope, allow_nil: false, value: :project default_value_for :wildcard, allow_nil: false, value: false + default_value_for :usage, allow_nil: false, value: :pages attr_encrypted :key, mode: :per_attribute_iv_and_salt, @@ -220,7 +222,7 @@ class PagesDomain < ApplicationRecord # rubocop: disable CodeReuse/ServiceClass def update_daemon - return if domain_type_instance? + return if usage_serverless? ::Projects::UpdatePagesConfigurationService.new(project).execute end |