FEATURE: new pop3 polling configuration admin dashboard check

This commit is contained in:
Régis Hanol 2016-02-17 11:25:49 +01:00
parent 2f926cfdd3
commit 8893d711e0
2 changed files with 7 additions and 2 deletions

View file

@ -62,7 +62,8 @@ class AdminDashboardData
:failing_emails_check, :default_logo_check, :contact_email_check,
:send_consumer_email_check, :title_check,
:site_description_check, :site_contact_username_check,
:notification_email_check, :subfolder_ends_in_slash_check
:notification_email_check, :subfolder_ends_in_slash_check,
:pop3_polling_configuration
add_problem_check do
sidekiq_check || queue_size_check
@ -205,4 +206,8 @@ class AdminDashboardData
I18n.t('dashboard.subfolder_ends_in_slash') if Discourse.base_uri =~ /\/$/
end
def pop3_polling_configuration
POP3PollingEnabledSettingValidator.new.error_message if SiteSetting.pop3_polling_enabled
end
end

View file

@ -23,7 +23,7 @@ class POP3PollingEnabledSettingValidator
I18n.t("site_settings.errors.pop3_polling_username_is_empty")
elsif SiteSetting.pop3_polling_password.blank?
I18n.t("site_settings.errors.pop3_polling_password_is_empty")
else
elsif !authentication_works?
I18n.t("site_settings.errors.pop3_polling_authentication_failed")
end
end