summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-02-11 13:46:15 -0500
committerChristopher Speller <crspeller@gmail.com>2016-02-11 13:46:15 -0500
commit395d51dda623136b8bb3e96cfa8ade33010b844a (patch)
tree035c09eca0c6fddaa518760e196097b921317849 /web/react/components/user_settings
parent50104a1aa8827bd6f25a1ef64fc3ff807071e29d (diff)
parent55a97b215d8e3127f931cc67670d520907120ac0 (diff)
downloadchat-395d51dda623136b8bb3e96cfa8ade33010b844a.tar.gz
chat-395d51dda623136b8bb3e96cfa8ade33010b844a.tar.bz2
chat-395d51dda623136b8bb3e96cfa8ade33010b844a.zip
Merge pull request #2145 from mattermost/PLT-1956
PLT-1956 Infinite "Loading..." Animation for Webhooks/Slash Commands UI
Diffstat (limited to 'web/react/components/user_settings')
-rw-r--r--web/react/components/user_settings/user_settings_modal.jsx14
1 files changed, 13 insertions, 1 deletions
diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx
index 7e911f09a..5442f7ac4 100644
--- a/web/react/components/user_settings/user_settings_modal.jsx
+++ b/web/react/components/user_settings/user_settings_modal.jsx
@@ -234,7 +234,10 @@ class UserSettingsModal extends React.Component {
render() {
const {formatMessage} = this.props.intl;
+ var currentUser = UserStore.getCurrentUser();
+ var isAdmin = Utils.isAdmin(currentUser.roles);
var tabs = [];
+
tabs.push({name: 'general', uiName: formatMessage(holders.general), icon: 'glyphicon glyphicon-cog'});
tabs.push({name: 'security', uiName: formatMessage(holders.security), icon: 'glyphicon glyphicon-lock'});
tabs.push({name: 'notifications', uiName: formatMessage(holders.notifications), icon: 'glyphicon glyphicon-exclamation-sign'});
@@ -243,8 +246,17 @@ class UserSettingsModal extends React.Component {
}
if (global.window.mm_config.EnableIncomingWebhooks === 'true' || global.window.mm_config.EnableOutgoingWebhooks === 'true' || global.window.mm_config.EnableCommands === 'true') {
- tabs.push({name: 'integrations', uiName: formatMessage(holders.integrations), icon: 'glyphicon glyphicon-transfer'});
+ var show = global.window.mm_config.EnableOnlyAdminIntegrations !== 'true';
+
+ if (global.window.mm_config.EnableOnlyAdminIntegrations === 'true' && isAdmin) {
+ show = true;
+ }
+
+ if (show) {
+ tabs.push({name: 'integrations', uiName: formatMessage(holders.integrations), icon: 'glyphicon glyphicon-transfer'});
+ }
}
+
tabs.push({name: 'display', uiName: formatMessage(holders.display), icon: 'glyphicon glyphicon-eye-open'});
tabs.push({name: 'advanced', uiName: formatMessage(holders.advanced), icon: 'glyphicon glyphicon-list-alt'});