summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/policy_settings.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/admin_console/policy_settings.jsx')
-rw-r--r--webapp/components/admin_console/policy_settings.jsx134
1 files changed, 125 insertions, 9 deletions
diff --git a/webapp/components/admin_console/policy_settings.jsx b/webapp/components/admin_console/policy_settings.jsx
index 501e3724e..50b9d4033 100644
--- a/webapp/components/admin_console/policy_settings.jsx
+++ b/webapp/components/admin_console/policy_settings.jsx
@@ -23,8 +23,12 @@ export default class PolicySettings extends AdminSettings {
getConfigFromState(config) {
config.TeamSettings.RestrictTeamInvite = this.state.restrictTeamInvite;
+ config.TeamSettings.RestrictPublicChannelCreation = this.state.restrictPublicChannelCreation;
+ config.TeamSettings.RestrictPrivateChannelCreation = this.state.restrictPrivateChannelCreation;
config.TeamSettings.RestrictPublicChannelManagement = this.state.restrictPublicChannelManagement;
config.TeamSettings.RestrictPrivateChannelManagement = this.state.restrictPrivateChannelManagement;
+ config.TeamSettings.RestrictPublicChannelDeletion = this.state.restrictPublicChannelDeletion;
+ config.TeamSettings.RestrictPrivateChannelDeletion = this.state.restrictPrivateChannelDeletion;
return config;
}
@@ -32,8 +36,12 @@ export default class PolicySettings extends AdminSettings {
getStateFromConfig(config) {
return {
restrictTeamInvite: config.TeamSettings.RestrictTeamInvite,
+ restrictPublicChannelCreation: config.TeamSettings.RestrictPublicChannelCreation,
+ restrictPrivateChannelCreation: config.TeamSettings.RestrictPrivateChannelCreation,
restrictPublicChannelManagement: config.TeamSettings.RestrictPublicChannelManagement,
- restrictPrivateChannelManagement: config.TeamSettings.RestrictPrivateChannelManagement
+ restrictPrivateChannelManagement: config.TeamSettings.RestrictPrivateChannelManagement,
+ restrictPublicChannelDeletion: config.TeamSettings.RestrictPublicChannelDeletion,
+ restrictPrivateChannelDeletion: config.TeamSettings.RestrictPrivateChannelDeletion
};
}
@@ -74,7 +82,7 @@ export default class PolicySettings extends AdminSettings {
}
/>
<DropdownSetting
- id='restrictPublicChannelManagement'
+ id='restrictPublicChannelCreation'
values={[
{value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAll', 'All team members')},
{value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
@@ -82,21 +90,75 @@ export default class PolicySettings extends AdminSettings {
]}
label={
<FormattedMessage
+ id='admin.general.policy.restrictPublicChannelCreationTitle'
+ defaultMessage='Enable public channel creation for:'
+ />
+ }
+ value={this.state.restrictPublicChannelCreation}
+ onChange={this.handleChange}
+ helpText={
+ <FormattedMessage
+ id='admin.general.policy.restrictPublicChannelCreationDescription'
+ defaultMessage='Set policy on who can create public channels.'
+ />
+ }
+ />
+ <DropdownSetting
+ id='restrictPublicChannelManagement'
+ values={[
+ {value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAllChannel', 'All channel members')},
+ {value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
+ {value: Constants.PERMISSIONS_SYSTEM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsSystemAdmin', 'System Admins')}
+ ]}
+ label={
+ <FormattedMessage
id='admin.general.policy.restrictPublicChannelManagementTitle'
- defaultMessage='Enable public channel management permissions for:'
+ defaultMessage='Enable public channel renaming for:'
/>
}
value={this.state.restrictPublicChannelManagement}
onChange={this.handleChange}
helpText={
- <FormattedHTMLMessage
+ <FormattedMessage
id='admin.general.policy.restrictPublicChannelManagementDescription'
- defaultMessage='Set policy on who can create, delete, rename, and set the header or purpose for public channels.'
+ defaultMessage='Set policy on who can rename and set the header or purpose for public channels.'
/>
}
/>
<DropdownSetting
- id='restrictPrivateChannelManagement'
+ id='restrictPublicChannelDeletion'
+ values={[
+ {value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAllChannel', 'All channel members')},
+ {value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
+ {value: Constants.PERMISSIONS_SYSTEM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsSystemAdmin', 'System Admins')}
+ ]}
+ label={
+ <FormattedMessage
+ id='admin.general.policy.restrictPublicChannelDeletionTitle'
+ defaultMessage='Enable public channel deletion for:'
+ />
+ }
+ value={this.state.restrictPublicChannelDeletion}
+ onChange={this.handleChange}
+ helpText={
+ <FormattedMessage
+ id='admin.general.policy.restrictPublicChannelDeletionDescription'
+ defaultMessage='Set policy on who can delete public channels. Deleted channels can be recovered from the database using a {commandLineToolLink}.'
+ values={{
+ commandLineToolLink: (
+ <a href='https://docs.mattermost.com/administration/command-line-tools.html'>
+ <FormattedMessage
+ id='admin.general.policy.restrictPublicChannelDeletionCommandLineToolLink'
+ defaultMessage='command line tool'
+ />
+ </a>
+ )
+ }}
+ />
+ }
+ />
+ <DropdownSetting
+ id='restrictPrivateChannelCreation'
values={[
{value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAll', 'All team members')},
{value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
@@ -104,16 +166,70 @@ export default class PolicySettings extends AdminSettings {
]}
label={
<FormattedMessage
+ id='admin.general.policy.restrictPrivateChannelCreationTitle'
+ defaultMessage='Enable private group creation for:'
+ />
+ }
+ value={this.state.restrictPrivateChannelCreation}
+ onChange={this.handleChange}
+ helpText={
+ <FormattedMessage
+ id='admin.general.policy.restrictPrivateChannelCreationDescription'
+ defaultMessage='Set policy on who can create private groups.'
+ />
+ }
+ />
+ <DropdownSetting
+ id='restrictPrivateChannelManagement'
+ values={[
+ {value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAllChannel', 'All channel members')},
+ {value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
+ {value: Constants.PERMISSIONS_SYSTEM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsSystemAdmin', 'System Admins')}
+ ]}
+ label={
+ <FormattedMessage
id='admin.general.policy.restrictPrivateChannelManagementTitle'
- defaultMessage='Enable private group management permissions for:'
+ defaultMessage='Enable private group renaming for:'
/>
}
value={this.state.restrictPrivateChannelManagement}
onChange={this.handleChange}
helpText={
- <FormattedHTMLMessage
+ <FormattedMessage
id='admin.general.policy.restrictPrivateChannelManagementDescription'
- defaultMessage='Set policy on who can create, delete, rename, and set the header or purpose for private groups.'
+ defaultMessage='Set policy on who can rename and set the header or purpose for private groups.'
+ />
+ }
+ />
+ <DropdownSetting
+ id='restrictPrivateChannelDeletion'
+ values={[
+ {value: Constants.PERMISSIONS_ALL, text: Utils.localizeMessage('admin.general.policy.permissionsAllChannel', 'All channel members')},
+ {value: Constants.PERMISSIONS_TEAM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsAdmin', 'Team and System Admins')},
+ {value: Constants.PERMISSIONS_SYSTEM_ADMIN, text: Utils.localizeMessage('admin.general.policy.permissionsSystemAdmin', 'System Admins')}
+ ]}
+ label={
+ <FormattedMessage
+ id='admin.general.policy.restrictPrivateChannelDeletionTitle'
+ defaultMessage='Enable private group deletion for:'
+ />
+ }
+ value={this.state.restrictPrivateChannelDeletion}
+ onChange={this.handleChange}
+ helpText={
+ <FormattedMessage
+ id='admin.general.policy.restrictPrivateChannelDeletionDescription'
+ defaultMessage='Set policy on who can delete private groups. Deleted groups can be recovered from the database using a {commandLineToolLink}.'
+ values={{
+ commandLineToolLink: (
+ <a href='https://docs.mattermost.com/administration/command-line-tools.html'>
+ <FormattedMessage
+ id='admin.general.policy.restrictPrivateChannelDeletionCommandLineToolLink'
+ defaultMessage='command line tool'
+ />
+ </a>
+ )
+ }}
/>
}
/>