FIX: do not show email disabled notice to staff when they can receive emails

This commit is contained in:
Arpit Jalan 2018-06-08 11:08:55 +05:30
parent 29c1f01494
commit 8bd4c11f53

View File

@ -22,7 +22,7 @@ export default Ember.Component.extend(bufferedRender({
notices.push([I18n.t("read_only_mode.enabled"), 'alert-read-only']);
}
if (this.siteSettings.disable_emails === "yes" || this.siteSettings.disable_emails === "non-staff") {
if (this.siteSettings.disable_emails === "yes" || (this.siteSettings.disable_emails === "non-staff" && !(this.currentUser && this.currentUser.get('staff')))) {
notices.push([I18n.t("emails_are_disabled"), 'alert-emails-disabled']);
}