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.
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
2c0c71d460
Коммит
22715a31ed
@@ -57,10 +57,42 @@ export default class EmailNotificationSetting extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
if (global.window.mm_config.SendEmailNotifications !== 'true' && this.props.activeSection === 'email') {
|
||||||
|
const inputs = [];
|
||||||
|
|
||||||
|
inputs.push(
|
||||||
|
<div
|
||||||
|
key='oauthEmailInfo'
|
||||||
|
className='padding-top'
|
||||||
|
>
|
||||||
|
<FormattedMessage
|
||||||
|
id='user.settings.notifications.email.disabled_long'
|
||||||
|
defaultMessage='Email notifications have been disabled by your System Administrator.'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SettingItemMax
|
||||||
|
title={localizeMessage('user.settings.notifications.emailNotifications', 'Email notifications')}
|
||||||
|
inputs={inputs}
|
||||||
|
server_error={this.state.serverError}
|
||||||
|
updateSection={this.collapse}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.props.activeSection !== 'email') {
|
if (this.props.activeSection !== 'email') {
|
||||||
let description;
|
let description;
|
||||||
|
|
||||||
if (this.props.enableEmail) {
|
if (global.window.mm_config.SendEmailNotifications !== 'true') {
|
||||||
|
description = (
|
||||||
|
<FormattedMessage
|
||||||
|
id='user.settings.notifications.email.disabled'
|
||||||
|
defaultMessage='Disabled by System Administrator'
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (this.props.enableEmail) {
|
||||||
switch (this.state.emailInterval) {
|
switch (this.state.emailInterval) {
|
||||||
case Preferences.INTERVAL_IMMEDIATE:
|
case Preferences.INTERVAL_IMMEDIATE:
|
||||||
description = (
|
description = (
|
||||||
|
|||||||
@@ -2163,6 +2163,8 @@
|
|||||||
"user.settings.notifications.desktop.title": "Desktop notifications",
|
"user.settings.notifications.desktop.title": "Desktop notifications",
|
||||||
"user.settings.notifications.desktop.unlimited": "Unlimited",
|
"user.settings.notifications.desktop.unlimited": "Unlimited",
|
||||||
"user.settings.notifications.desktopSounds": "Desktop notification sounds",
|
"user.settings.notifications.desktopSounds": "Desktop notification sounds",
|
||||||
|
"user.settings.notifications.email.disabled": "Disabled by System Administrator",
|
||||||
|
"user.settings.notifications.email.disabled_long": "Email notifications have been disabled by your System Administrator.",
|
||||||
"user.settings.notifications.email.everyHour": "Every hour",
|
"user.settings.notifications.email.everyHour": "Every hour",
|
||||||
"user.settings.notifications.email.everyXMinutes": "Every {count, plural, one {minute} other {{count, number} minutes}}",
|
"user.settings.notifications.email.everyXMinutes": "Every {count, plural, one {minute} other {{count, number} minutes}}",
|
||||||
"user.settings.notifications.email.immediately": "Immediately",
|
"user.settings.notifications.email.immediately": "Immediately",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user