debian-mirror-gitlab/app/presenters/pages_domain_presenter.rb

17 lines
489 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
class PagesDomainPresenter < Gitlab::View::Presenter::Delegated
2021-11-18 22:05:49 +05:30
presents ::PagesDomain, as: :pages_domain
2020-04-22 19:07:51 +05:30
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