mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 06:03:46 +08:00
S3 deprecation warning
This commit is contained in:
parent
590b73e25e
commit
1095e165d5
|
@ -42,7 +42,8 @@ class AdminDashboardData
|
||||||
title_check,
|
title_check,
|
||||||
site_description_check,
|
site_description_check,
|
||||||
site_contact_username_check,
|
site_contact_username_check,
|
||||||
notification_email_check
|
notification_email_check,
|
||||||
|
s3_deprecation_warning
|
||||||
].compact
|
].compact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -186,4 +187,8 @@ class AdminDashboardData
|
||||||
I18n.t('dashboard.ruby_version_warning') if RUBY_VERSION == '2.0.0' and RUBY_PATCHLEVEL < 247
|
I18n.t('dashboard.ruby_version_warning') if RUBY_VERSION == '2.0.0' and RUBY_PATCHLEVEL < 247
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def s3_deprecation_warning
|
||||||
|
I18n.t('dashboard.s3_deprecation_warning') if SiteSetting.enable_s3_uploads
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -701,6 +701,7 @@ en:
|
||||||
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."
|
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."
|
||||||
site_contact_username_warning: "Enter the name of a friendly staff user account to send important automated private messages from. Update site_contact_username in <a href='/admin/site_settings'>Site Settings</a>."
|
site_contact_username_warning: "Enter the name of a friendly staff user account to send important automated private messages from. Update site_contact_username in <a href='/admin/site_settings'>Site Settings</a>."
|
||||||
notification_email_warning: "Notification emails are not being sent from a valid email address on your domain; email delivery will be erratic and unreliable. Please set notification_email to a valid local email address in <a href='/admin/site_settings'>Site Settings</a>."
|
notification_email_warning: "Notification emails are not being sent from a valid email address on your domain; email delivery will be erratic and unreliable. Please set notification_email to a valid local email address in <a href='/admin/site_settings'>Site Settings</a>."
|
||||||
|
s3_deprecation_warning: "WARNING! Amazon S3 will soon be deprecated for image/attachment storage. Please, follow the <a href='https://meta.discourse.org/t/warning-amazon-s3-is-deprecated-in-1-3-for-image-attachment-storage/26594'>instructions</a> to migrate to local storage."
|
||||||
|
|
||||||
content_types:
|
content_types:
|
||||||
education_new_reply:
|
education_new_reply:
|
||||||
|
|
|
@ -244,4 +244,20 @@ describe AdminDashboardData do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 's3_deprecation_warning' do
|
||||||
|
subject { described_class.new.s3_deprecation_warning }
|
||||||
|
|
||||||
|
it 'returns nil when using local storage' do
|
||||||
|
SiteSetting.stubs(:enable_s3_uploads).returns(false)
|
||||||
|
ENV.stubs(:[]).with('RUBY_GC_MALLOC_LIMIT').returns(90000000)
|
||||||
|
expect(subject).to be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns a string when s3 storage' do
|
||||||
|
SiteSetting.stubs(:enable_s3_uploads).returns(true)
|
||||||
|
expect(subject).to_not be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user