2020-03-30 11:07:51 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class PagesDomainPresenter < Gitlab::View::Presenter::Delegated
|
2021-09-21 05:12:21 -04:00
|
|
|
presents ::PagesDomain, as: :pages_domain
|
|
|
|
|
|
|
|
delegator_override :subject # TODO: Fix `Gitlab::View::Presenter::Delegated#subject` not to override `PagesDomain#subject`.
|
2020-03-30 11:07:51 -04:00
|
|
|
|
|
|
|
def needs_verification?
|
|
|
|
Gitlab::CurrentSettings.pages_domain_verification_enabled? && unverified?
|
|
|
|
end
|
|
|
|
|
|
|
|
def show_auto_ssl_failed_warning?
|
|
|
|
# validations prevents auto ssl from working, so there is no need to show that warning until
|
|
|
|
return false if needs_verification?
|
|
|
|
|
|
|
|
::Gitlab::LetsEncrypt.enabled? && auto_ssl_failed
|
|
|
|
end
|
|
|
|
end
|