summaryrefslogtreecommitdiffstats
path: root/webapp/components/navbar_dropdown.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-05-05 09:32:12 -0400
committerChristopher Speller <crspeller@gmail.com>2016-05-05 09:32:12 -0400
commit2c92540471004c79e317e8a0daf3e612560beda7 (patch)
tree2abed81a2b4340cfaeaed47e70a6b14d0129bc47 /webapp/components/navbar_dropdown.jsx
parentfcb5b70eb348368421464553066ef9c715c66ff0 (diff)
downloadchat-2c92540471004c79e317e8a0daf3e612560beda7.tar.gz
chat-2c92540471004c79e317e8a0daf3e612560beda7.tar.bz2
chat-2c92540471004c79e317e8a0daf3e612560beda7.zip
PLT-2698 Integrations improvements (#2883)
* Fixed Integrations link to show up for non-admins (when enabled) and when only slash commands are enabled * Updated BackstageSidebar to only show enabled integrations * Added placeholder to integrations list when none exist * Added loading spinner to integrations pages when they're loading
Diffstat (limited to 'webapp/components/navbar_dropdown.jsx')
-rw-r--r--webapp/components/navbar_dropdown.jsx28
1 files changed, 15 insertions, 13 deletions
diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx
index 71c1f0d5b..967c5a95c 100644
--- a/webapp/components/navbar_dropdown.jsx
+++ b/webapp/components/navbar_dropdown.jsx
@@ -143,19 +143,21 @@ export default class NavbarDropdown extends React.Component {
);
}
- if (window.mm_config.EnableIncomingWebhooks === 'true' || window.mm_config.EnableOutgoingWebhooks === 'true') {
- if (isAdmin || window.EnableAdminOnlyIntegrations !== 'true') {
- integrationsLink = (
- <li>
- <Link to={'/' + Utils.getTeamNameFromUrl() + '/settings/integrations'}>
- <FormattedMessage
- id='navbar_dropdown.integrations'
- defaultMessage='Integrations'
- />
- </Link>
- </li>
- );
- }
+ const integrationsEnabled =
+ window.mm_config.EnableIncomingWebhooks === 'true' ||
+ window.mm_config.EnableOutgoingWebhooks === 'true' ||
+ window.mm_config.EnableCommands === 'true';
+ if (integrationsEnabled && (isAdmin || window.EnableOnlyAdminIntegrations !== 'true')) {
+ integrationsLink = (
+ <li>
+ <Link to={'/' + Utils.getTeamNameFromUrl() + '/settings/integrations'}>
+ <FormattedMessage
+ id='navbar_dropdown.integrations'
+ defaultMessage='Integrations'
+ />
+ </Link>
+ </li>
+ );
}
if (isSystemAdmin) {