diff options
author | enahum <nahumhbl@gmail.com> | 2016-08-03 12:19:27 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-08-03 13:19:27 -0400 |
commit | 5bc3cea6fe4a909735753692d0c4cd960e8ab516 (patch) | |
tree | 85715d9fcbc146a9672d84c9a1ea1e96b6e71231 /webapp/components/backstage | |
parent | ea027c8de44d44b6ac4e66ab802e675d315b0be5 (diff) | |
download | chat-5bc3cea6fe4a909735753692d0c4cd960e8ab516.tar.gz chat-5bc3cea6fe4a909735753692d0c4cd960e8ab516.tar.bz2 chat-5bc3cea6fe4a909735753692d0c4cd960e8ab516.zip |
PLT-3484 OAuth2 Service Provider (#3632)
* PLT-3484 OAuth2 Service Provider
* PM text review for OAuth 2.0 Service Provider
* PLT-3484 OAuth2 Service Provider UI tweaks (#3668)
* Tweaks to help text
* Pushing OAuth improvements (#3680)
* Re-arrange System Console for OAuth 2.0 Provider
Diffstat (limited to 'webapp/components/backstage')
-rw-r--r-- | webapp/components/backstage/components/backstage_sidebar.jsx | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/webapp/components/backstage/components/backstage_sidebar.jsx b/webapp/components/backstage/components/backstage_sidebar.jsx index 3434b315a..554e3043e 100644 --- a/webapp/components/backstage/components/backstage_sidebar.jsx +++ b/webapp/components/backstage/components/backstage_sidebar.jsx @@ -39,20 +39,22 @@ export default class BackstageSidebar extends React.Component { } renderIntegrations() { - if (window.mm_config.EnableIncomingWebhooks !== 'true' && - window.mm_config.EnableOutgoingWebhooks !== 'true' && - window.mm_config.EnableCommands !== 'true') { + const config = window.mm_config; + if (config.EnableIncomingWebhooks !== 'true' && + config.EnableOutgoingWebhooks !== 'true' && + config.EnableCommands !== 'true' && + config.EnableOAuthServiceProvider !== 'true') { return null; } - if (window.mm_config.EnableOnlyAdminIntegrations !== 'false' && + if (config.EnableOnlyAdminIntegrations !== 'false' && !Utils.isSystemAdmin(this.props.user.roles) && !TeamStore.isTeamAdmin(this.props.user.id, this.props.team.id)) { return null; } let incomingWebhooks = null; - if (window.mm_config.EnableIncomingWebhooks === 'true') { + if (config.EnableIncomingWebhooks === 'true') { incomingWebhooks = ( <BackstageSection name='incoming_webhooks' @@ -67,7 +69,7 @@ export default class BackstageSidebar extends React.Component { } let outgoingWebhooks = null; - if (window.mm_config.EnableOutgoingWebhooks === 'true') { + if (config.EnableOutgoingWebhooks === 'true') { outgoingWebhooks = ( <BackstageSection name='outgoing_webhooks' @@ -82,7 +84,7 @@ export default class BackstageSidebar extends React.Component { } let commands = null; - if (window.mm_config.EnableCommands === 'true') { + if (config.EnableCommands === 'true') { commands = ( <BackstageSection name='commands' @@ -96,6 +98,21 @@ export default class BackstageSidebar extends React.Component { ); } + let oauthApps = null; + if (config.EnableOAuthServiceProvider === 'true') { + oauthApps = ( + <BackstageSection + name='oauth2-apps' + title={ + <FormattedMessage + id='backstage_sidebar.integrations.oauthApps' + defaultMessage='OAuth 2.0 Applications' + /> + } + /> + ); + } + return ( <BackstageCategory name='integrations' @@ -111,6 +128,7 @@ export default class BackstageSidebar extends React.Component { {incomingWebhooks} {outgoingWebhooks} {commands} + {oauthApps} </BackstageCategory> ); } |