diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 18:07:56 +0300 |
commit | 016af097cb1fa872fdc28a786d16315e55cd2701 (patch) | |
tree | 76f97f90a8048685efb3eb0c543b3a75d99be6ee /app/models/pages_domain.rb | |
parent | 00b8ecb72c9f77d864aff3572f028613f45af03c (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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/pages_domain.rb b/app/models/pages_domain.rb index 3869d86b667..dd2cafd9a35 100644 --- a/app/models/pages_domain.rb +++ b/app/models/pages_domain.rb @@ -6,6 +6,7 @@ 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 belongs_to :project has_many :acme_orders, class_name: "PagesDomainAcmeOrder" @@ -25,6 +26,8 @@ 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 :wildcard, allow_nil: false, value: false attr_encrypted :key, mode: :per_attribute_iv_and_salt, @@ -217,6 +220,8 @@ class PagesDomain < ApplicationRecord # rubocop: disable CodeReuse/ServiceClass def update_daemon + return if domain_type_instance? + ::Projects::UpdatePagesConfigurationService.new(project).execute end # rubocop: enable CodeReuse/ServiceClass |