diff --git a/app/models/admin_dashboard_data.rb b/app/models/admin_dashboard_data.rb index c1eeeab3eb7..dbc819b8aed 100644 --- a/app/models/admin_dashboard_data.rb +++ b/app/models/admin_dashboard_data.rb @@ -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: diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 00cc157bb77..e0e4511636c 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -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 Site Settings." consumer_email_warning: "Your site is configured to use Gmail (or another consumer email service) to send email. Gmail limits how many emails you can send. 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 Site Settings. Be sure to approve users in the Pending Users list. (This message will go away after 2 days.)" + system_username_warning: "The system_username setting is blank. Please update it in the Site Settings. 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 Site Settings." content_types: education_new_reply: