Add dashboard warnings for system_username and notification_email site settings
This commit is contained in:
parent
dea75870e1
commit
196a8f4ba5
|
@ -36,7 +36,9 @@ class AdminDashboardData
|
|||
contact_email_check,
|
||||
send_consumer_email_check,
|
||||
title_check,
|
||||
access_password_removal ].compact
|
||||
access_password_removal,
|
||||
system_username_check,
|
||||
notification_email_check ].compact
|
||||
end
|
||||
|
||||
def self.fetch_all
|
||||
|
@ -137,6 +139,14 @@ class AdminDashboardData
|
|||
I18n.t('dashboard.consumer_email_warning') if Rails.env == 'production' and ActionMailer::Base.smtp_settings[:address] =~ /gmail\.com|live\.com|yahoo\.com/
|
||||
end
|
||||
|
||||
def system_username_check
|
||||
I18n.t('dashboard.system_username_warning') if SiteSetting.system_username.blank?
|
||||
end
|
||||
|
||||
def notification_email_check
|
||||
I18n.t('dashboard.notification_email_warning') if SiteSetting.notification_email.blank?
|
||||
end
|
||||
|
||||
|
||||
# TODO: generalize this method of putting i18n keys with expiry in redis
|
||||
# that should be reported on the admin dashboard:
|
||||
|
|
|
@ -394,6 +394,8 @@ en:
|
|||
title_nag: "The title Site Setting is still set to the default value. Please update it with your site's title in the <a href='/admin/site_settings'>Site Settings</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."
|
||||
access_password_removal: "Your site was using the access_password setting, which has been removed. The login_required and must_approve_users settings have been enabled, which should be used instead. You can change them in the <a href='/admin/site_settings'>Site Settings</a>. Be sure to <a href='/admin/users/list/pending'>approve users in the Pending Users list</a>. (This message will go away after 2 days.)"
|
||||
system_username_warning: "The system_username setting is blank. Please update it in the <a href='/admin/site_settings'>Site Settings</a>. Set it to the username of an admin user who should be the sender of system messages."
|
||||
notification_email_warning: "The notification_email setting is blank. Please update it in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
|
||||
content_types:
|
||||
education_new_reply:
|
||||
|
|
Loading…
Reference in New Issue