remove gmail/live SMTP warning
This commit is contained in:
parent
35a79a70c3
commit
febbd27ba6
|
@ -94,7 +94,7 @@ class AdminDashboardData
|
|||
:ram_check, :google_oauth2_config_check,
|
||||
:facebook_config_check, :twitter_config_check,
|
||||
:github_config_check, :s3_config_check, :image_magick_check,
|
||||
:failing_emails_check, :send_consumer_email_check,
|
||||
:failing_emails_check,
|
||||
:subfolder_ends_in_slash_check,
|
||||
:pop3_polling_configuration, :email_polling_errored_recently
|
||||
|
||||
|
@ -214,10 +214,6 @@ class AdminDashboardData
|
|||
I18n.t('dashboard.failing_emails_warning', num_failed_jobs: num_failed_jobs) if num_failed_jobs > 0
|
||||
end
|
||||
|
||||
def send_consumer_email_check
|
||||
I18n.t('dashboard.consumer_email_warning') if Rails.env.production? and ActionMailer::Base.smtp_settings[:address] =~ /gmail\.com|live\.com|yahoo\.com/
|
||||
end
|
||||
|
||||
def subfolder_ends_in_slash_check
|
||||
I18n.t('dashboard.subfolder_ends_in_slash') if Discourse.base_uri =~ /\/$/
|
||||
end
|
||||
|
|
|
@ -816,8 +816,7 @@ en:
|
|||
s3_config_warning: 'The server is configured to upload files to s3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key or s3_upload_bucket. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="http://meta.discourse.org/t/how-to-set-up-image-uploads-to-s3/7229" target="_blank">See "How to set up image uploads to S3?" to learn more</a>.'
|
||||
s3_backup_config_warning: 'The server is configured to upload backups to s3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key or s3_backup_bucket. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="http://meta.discourse.org/t/how-to-set-up-image-uploads-to-s3/7229" target="_blank">See "How to set up image uploads to S3?" to learn more</a>.'
|
||||
image_magick_warning: 'The server is configured to create thumbnails of large images, but ImageMagick is not installed. Install ImageMagick using your favorite package manager or <a href="http://www.imagemagick.org/script/binary-releases.php" target="_blank">download the latest release</a>.'
|
||||
failing_emails_warning: 'There are %{num_failed_jobs} email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. <a href="/sidekiq/retries" target="_blank">See the failed jobs in Sidekiq</a>.'
|
||||
consumer_email_warning: "Your site is configured to use Gmail (or another consumer email service) to send email. <a href='http://support.google.com/a/bin/answer.py?hl=en&answer=166852' target='_blank'>Gmail limits how many emails you can send</a>. Consider using an email service provider like mandrill.com to ensure email deliverability."
|
||||
failing_emails_warning: 'There are %{num_failed_jobs} email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. <a href="/sidekiq/retries" target="_blank">See the failed jobs in Sidekiq</a>.'
|
||||
subfolder_ends_in_slash: "Your subfolder setup is incorrect; the DISCOURSE_RELATIVE_URL_ROOT ends in a slash."
|
||||
email_polling_errored_recently:
|
||||
one: "Email polling has generated an error in the past 24 hours. Look at <a href='/logs' target='_blank'>the logs</a> for more details."
|
||||
|
|
|
@ -123,29 +123,6 @@ describe AdminDashboardData do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'send_consumer_email_check' do
|
||||
subject { described_class.new.send_consumer_email_check }
|
||||
|
||||
it 'returns nil if gmail.com is not in the smtp_settings address' do
|
||||
ActionMailer::Base.stubs(:smtp_settings).returns({address: 'mandrillapp.com'})
|
||||
expect(subject).to be_nil
|
||||
end
|
||||
|
||||
context 'gmail.com is in the smtp_settings address' do
|
||||
before { ActionMailer::Base.stubs(:smtp_settings).returns({address: 'smtp.gmail.com'}) }
|
||||
|
||||
it 'returns nil in development env' do
|
||||
Rails.stubs(env: ActiveSupport::StringInquirer.new('development'))
|
||||
expect(subject).to be_nil
|
||||
end
|
||||
|
||||
it 'returns a string when in production env' do
|
||||
Rails.stubs(env: ActiveSupport::StringInquirer.new('production'))
|
||||
expect(subject).not_to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'auth_config_checks' do
|
||||
|
||||
shared_examples 'problem detection for login providers' do
|
||||
|
|
Loading…
Reference in New Issue