From 22715a31ed6238eb4f8f0dd8125bf23958345e78 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 24 Mar 2017 20:43:09 +0000 Subject: PLT-5879: User email notification settings disabling. (#5837) When Email Notifications are turned off server wide, don't allow the user to configure their email notification preferences. --- .../user_settings/email_notification_setting.jsx | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/user_settings/email_notification_setting.jsx b/webapp/components/user_settings/email_notification_setting.jsx index 1e6c5d7f5..6980be0b7 100644 --- a/webapp/components/user_settings/email_notification_setting.jsx +++ b/webapp/components/user_settings/email_notification_setting.jsx @@ -57,10 +57,42 @@ export default class EmailNotificationSetting extends React.Component { } render() { + if (global.window.mm_config.SendEmailNotifications !== 'true' && this.props.activeSection === 'email') { + const inputs = []; + + inputs.push( +
+ +
+ ); + + return ( + + ); + } + if (this.props.activeSection !== 'email') { let description; - if (this.props.enableEmail) { + if (global.window.mm_config.SendEmailNotifications !== 'true') { + description = ( + + ); + } else if (this.props.enableEmail) { switch (this.state.emailInterval) { case Preferences.INTERVAL_IMMEDIATE: description = ( -- cgit v1.2.3-1-g7c22