diff options
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/admin_console/users_and_teams_settings.jsx | 19 | ||||
-rw-r--r-- | webapp/components/create_team/components/team_url.jsx | 10 | ||||
-rw-r--r-- | webapp/utils/constants.jsx | 18 |
3 files changed, 8 insertions, 39 deletions
diff --git a/webapp/components/admin_console/users_and_teams_settings.jsx b/webapp/components/admin_console/users_and_teams_settings.jsx index 60ee70264..dd19005c8 100644 --- a/webapp/components/admin_console/users_and_teams_settings.jsx +++ b/webapp/components/admin_console/users_and_teams_settings.jsx @@ -30,7 +30,6 @@ export default class UsersAndTeamsSettings extends AdminSettings { config.TeamSettings.EnableTeamCreation = this.state.enableTeamCreation; config.TeamSettings.MaxUsersPerTeam = this.parseIntNonZero(this.state.maxUsersPerTeam, Constants.DEFAULT_MAX_USERS_PER_TEAM); config.TeamSettings.RestrictCreationToDomains = this.state.restrictCreationToDomains; - config.TeamSettings.RestrictTeamNames = this.state.restrictTeamNames; config.TeamSettings.RestrictDirectMessage = this.state.restrictDirectMessage; config.TeamSettings.MaxChannelsPerTeam = this.parseIntNonZero(this.state.maxChannelsPerTeam, Constants.DEFAULT_MAX_CHANNELS_PER_TEAM); @@ -43,7 +42,6 @@ export default class UsersAndTeamsSettings extends AdminSettings { enableTeamCreation: config.TeamSettings.EnableTeamCreation, maxUsersPerTeam: config.TeamSettings.MaxUsersPerTeam, restrictCreationToDomains: config.TeamSettings.RestrictCreationToDomains, - restrictTeamNames: config.TeamSettings.RestrictTeamNames, restrictDirectMessage: config.TeamSettings.RestrictDirectMessage, maxChannelsPerTeam: config.TeamSettings.MaxChannelsPerTeam }; @@ -151,23 +149,6 @@ export default class UsersAndTeamsSettings extends AdminSettings { value={this.state.restrictCreationToDomains} onChange={this.handleChange} /> - <BooleanSetting - id='restrictTeamNames' - label={ - <FormattedMessage - id='admin.team.restrictNameTitle' - defaultMessage='Restrict Team Names: ' - /> - } - helpText={ - <FormattedMessage - id='admin.team.restrictNameDesc' - defaultMessage='When true, You cannot create a team name with reserved words like www, admin, support, test, channel, etc' - /> - } - value={this.state.restrictTeamNames} - onChange={this.handleChange} - /> <DropdownSetting id='restrictDirectMessage' values={[ diff --git a/webapp/components/create_team/components/team_url.jsx b/webapp/components/create_team/components/team_url.jsx index d2ccc97d9..b943f983c 100644 --- a/webapp/components/create_team/components/team_url.jsx +++ b/webapp/components/create_team/components/team_url.jsx @@ -54,12 +54,10 @@ export default class TeamUrl extends React.Component { return; } - if (global.window.mm_config.RestrictTeamNames === 'true') { - for (let index = 0; index < Constants.RESERVED_TEAM_NAMES.length; index++) { - if (cleanedName.indexOf(Constants.RESERVED_TEAM_NAMES[index]) === 0) { - this.setState({nameError: Utils.localizeMessage('create_team.team_url.taken', 'URL is taken or contains a reserved word')}); - return; - } + for (let index = 0; index < Constants.RESERVED_TEAM_NAMES.length; index++) { + if (cleanedName.indexOf(Constants.RESERVED_TEAM_NAMES[index]) === 0) { + this.setState({nameError: Utils.localizeMessage('create_team.team_url.taken', 'URL is taken or contains a reserved word')}); + return; } } diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx index efc0d8482..663a8863c 100644 --- a/webapp/utils/constants.jsx +++ b/webapp/utils/constants.jsx @@ -331,23 +331,13 @@ export const Constants = { SYSTEM_MESSAGE_PROFILE_NAME: 'System', SYSTEM_MESSAGE_PROFILE_IMAGE: logoImage, RESERVED_TEAM_NAMES: [ - 'www', - 'web', + 'signup', + 'login', 'admin', - 'support', - 'notify', - 'test', - 'demo', - 'mail', - 'team', 'channel', - 'internal', - 'localhost', - 'dockerhost', - 'stag', 'post', - 'cluster', - 'api' + 'api', + 'oauth' ], RESERVED_USERNAMES: [ 'valet', |