summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-05-04 06:31:42 -0700
committerChristopher Speller <crspeller@gmail.com>2016-05-04 09:31:42 -0400
commit6611229cd7bd3cdfc0082c0a581145aaac0ab322 (patch)
treedb6670a8c2716179bfe6e07b82588d83d3afb6bd /webapp/components/admin_console
parent6b06f49e8910ed44f619adad15ab268758312852 (diff)
downloadchat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.gz
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.tar.bz2
chat-6611229cd7bd3cdfc0082c0a581145aaac0ab322.zip
PLT-2707 Adding option to show DM list from all of server (#2871)
* PLT-2707 Adding option to show DM list from all of server * Fixing loc
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r--webapp/components/admin_console/team_settings.jsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/webapp/components/admin_console/team_settings.jsx b/webapp/components/admin_console/team_settings.jsx
index bbb7ec3c4..e7bfcd74a 100644
--- a/webapp/components/admin_console/team_settings.jsx
+++ b/webapp/components/admin_console/team_settings.jsx
@@ -24,6 +24,14 @@ const holders = defineMessages({
saving: {
id: 'admin.team.saving',
defaultMessage: 'Saving Config...'
+ },
+ restrictDirectMessageAny: {
+ id: 'admin.team.restrict_direct_message_any',
+ defaultMessage: 'Any user on the Mattermost server'
+ },
+ restrictDirectMessageTeam: {
+ id: 'admin.team.restrict_direct_message_team',
+ defaultMessage: 'Any member of the team'
}
});
@@ -48,6 +56,7 @@ class TeamSettings extends React.Component {
saveNeeded: false,
brandImageExists: false,
enableCustomBrand: this.props.config.TeamSettings.EnableCustomBrand,
+ restrictDirectMessage: this.props.config.TeamSettings.RestrictDirectMessage,
serverError: null
};
}
@@ -104,6 +113,7 @@ class TeamSettings extends React.Component {
config.TeamSettings.EnableUserCreation = this.refs.EnableUserCreation.checked;
config.TeamSettings.EnableOpenServer = this.refs.EnableOpenServer.checked;
config.TeamSettings.RestrictTeamNames = this.refs.RestrictTeamNames.checked;
+ config.TeamSettings.RestrictDirectMessage = this.refs.RestrictDirectMessage.value.trim();
if (this.refs.EnableCustomBrand) {
config.TeamSettings.EnableCustomBrand = this.refs.EnableCustomBrand.checked;
@@ -660,6 +670,36 @@ class TeamSettings extends React.Component {
</div>
</div>
+ <div className='form-group'>
+ <label
+ className='control-label col-sm-4'
+ htmlFor='restrictDirectMessage'
+ >
+ <FormattedMessage
+ id='admin.team.restrictDirectMessage'
+ defaultMessage='Enable users to open Direct Message channels with:'
+ />
+ </label>
+ <div className='col-sm-8'>
+ <select
+ className='form-control'
+ id='restrictDirectMessage'
+ ref='RestrictDirectMessage'
+ defaultValue={this.props.config.TeamSettings.RestrictDirectMessage}
+ onChange={this.handleChange.bind(this, 'restrictDirectMessage')}
+ >
+ <option value='any'>{formatMessage(holders.restrictDirectMessageAny)}</option>
+ <option value='team'>{formatMessage(holders.restrictDirectMessageTeam)}</option>
+ </select>
+ <p className='help-text'>
+ <FormattedHTMLMessage
+ id='admin.team.restrictDirectMessageDesc'
+ defaultMessage='"Any user on the Mattermost server" enables users to open a Direct Message channel with any user on the server, even if they are not on any teams together. "Any member of the team" limits the ability to open Direct Message channels to only users who are in the same team.'
+ />
+ </p>
+ </div>
+ </div>
+
{brand}
<div className='form-group'>