Class: PagesDomainPresenter
- Inherits:
-
Gitlab::View::Presenter::Delegated
- Object
- SimpleDelegator
- Gitlab::View::Presenter::Delegated
- PagesDomainPresenter
- Defined in:
- app/presenters/pages_domain_presenter.rb
Instance Method Summary collapse
- #needs_verification? ⇒ Boolean
- #show_auto_ssl_failed_warning? ⇒ Boolean
- #user_defined_certificate? ⇒ Boolean
Methods inherited from Gitlab::View::Presenter::Delegated
Methods included from Gitlab::Utils::DelegatorOverride
#delegator_override, #delegator_override_with, #delegator_target, validator, validators, verify!
Methods included from Gitlab::View::Presenter::Base
#__subject__, #can?, #declarative_policy_delegate, #is_a?, #path_with_line_numbers, #present, #url_builder, #web_path, #web_url
Methods included from Gitlab::Allowable
Methods included from Gitlab::Routing
includes_helpers, redirect_legacy_paths, url_helpers
Constructor Details
This class inherits a constructor from Gitlab::View::Presenter::Delegated
Instance Method Details
#needs_verification? ⇒ Boolean
6 7 8 |
# File 'app/presenters/pages_domain_presenter.rb', line 6 def needs_verification? Gitlab::CurrentSettings.pages_domain_verification_enabled? && unverified? end |
#show_auto_ssl_failed_warning? ⇒ Boolean
10 11 12 13 14 15 |
# File 'app/presenters/pages_domain_presenter.rb', line 10 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 |
#user_defined_certificate? ⇒ Boolean
17 18 19 20 21 22 |
# File 'app/presenters/pages_domain_presenter.rb', line 17 def user_defined_certificate? persisted? && certificate.present? && certificate_user_provided? && errors[:certificate].blank? end |