PLT-4429 disabling at_all at_channel metions mentions when channel has more than 1k users (#4627)
* PLT-4429 disabling explicit mentions when channel has more than 1k users * Fixing test case * Adding setting to the admin console * Fixing bad translation
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
0f07a2d288
Коммит
b212acf312
@@ -32,6 +32,7 @@ export default class UsersAndTeamsSettings extends AdminSettings {
|
||||
config.TeamSettings.RestrictCreationToDomains = this.state.restrictCreationToDomains;
|
||||
config.TeamSettings.RestrictDirectMessage = this.state.restrictDirectMessage;
|
||||
config.TeamSettings.MaxChannelsPerTeam = this.parseIntNonZero(this.state.maxChannelsPerTeam, Constants.DEFAULT_MAX_CHANNELS_PER_TEAM);
|
||||
config.TeamSettings.MaxNotificationsPerChannel = this.parseIntNonZero(this.state.maxNotificationsPerChannel, Constants.DEFAULT_MAX_NOTIFICATIONS_PER_CHANNEL);
|
||||
|
||||
return config;
|
||||
}
|
||||
@@ -43,7 +44,8 @@ export default class UsersAndTeamsSettings extends AdminSettings {
|
||||
maxUsersPerTeam: config.TeamSettings.MaxUsersPerTeam,
|
||||
restrictCreationToDomains: config.TeamSettings.RestrictCreationToDomains,
|
||||
restrictDirectMessage: config.TeamSettings.RestrictDirectMessage,
|
||||
maxChannelsPerTeam: config.TeamSettings.MaxChannelsPerTeam
|
||||
maxChannelsPerTeam: config.TeamSettings.MaxChannelsPerTeam,
|
||||
maxNotificationsPerChannel: config.TeamSettings.MaxNotificationsPerChannel
|
||||
};
|
||||
}
|
||||
|
||||
@@ -131,6 +133,24 @@ export default class UsersAndTeamsSettings extends AdminSettings {
|
||||
value={this.state.maxChannelsPerTeam}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<TextSetting
|
||||
id='maxNotificationsPerChannel'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='admin.team.maxNotificationsPerChannelTitle'
|
||||
defaultMessage='Max Notifications Per Channel:'
|
||||
/>
|
||||
}
|
||||
placeholder={Utils.localizeMessage('admin.team.maxNotificationsPerChannelExample', 'Ex "1000"')}
|
||||
helpText={
|
||||
<FormattedMessage
|
||||
id='admin.team.maxNotificationsPerChannelDescription'
|
||||
defaultMessage='Maximum total number of users in a channel before users typing messages, @all, @here, and @channel no longer send notifications because of performance.'
|
||||
/>
|
||||
}
|
||||
value={this.state.maxNotificationsPerChannel}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<TextSetting
|
||||
id='restrictCreationToDomains'
|
||||
label={
|
||||
|
||||
@@ -807,6 +807,9 @@
|
||||
"admin.team.maxChannelsDescription": "Maximum total number of channels per team, including both active and deleted channels.",
|
||||
"admin.team.maxChannelsExample": "Ex \"100\"",
|
||||
"admin.team.maxChannelsTitle": "Max Channels Per Team:",
|
||||
"admin.team.maxNotificationsPerChannelTitle" : "Max Notifications Per Channel:",
|
||||
"admin.team.maxNotificationsPerChannelExample" : "Ex \"1000\"",
|
||||
"admin.team.maxNotificationsPerChannelDescription" : "Maximum total number of users in a channel before users typing messages, @all, @here, and @channel no longer send notifications because of performance.",
|
||||
"admin.team.maxUsersDescription": "Maximum total number of users per team, including both active and inactive users.",
|
||||
"admin.team.maxUsersExample": "E.g.: \"25\"",
|
||||
"admin.team.maxUsersTitle": "Max Users Per Team:",
|
||||
|
||||
@@ -821,6 +821,7 @@ export const Constants = {
|
||||
DEFAULT_MAX_USERS_PER_TEAM: 50,
|
||||
MIN_TEAMNAME_LENGTH: 2,
|
||||
DEFAULT_MAX_CHANNELS_PER_TEAM: 2000,
|
||||
DEFAULT_MAX_NOTIFICATIONS_PER_CHANNEL: 1000,
|
||||
MAX_TEAMNAME_LENGTH: 15,
|
||||
MIN_USERNAME_LENGTH: 3,
|
||||
MAX_USERNAME_LENGTH: 22,
|
||||
|
||||
Ссылка в новой задаче
Block a user