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/integrations/components/integrations.jsx | |
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/integrations/components/integrations.jsx')
-rw-r--r-- | webapp/components/integrations/components/integrations.jsx | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/webapp/components/integrations/components/integrations.jsx b/webapp/components/integrations/components/integrations.jsx index 7894ced5d..ec923c4f0 100644 --- a/webapp/components/integrations/components/integrations.jsx +++ b/webapp/components/integrations/components/integrations.jsx @@ -7,6 +7,7 @@ import {FormattedMessage} from 'react-intl'; import IntegrationOption from './integration_option.jsx'; import WebhookIcon from 'images/webhook_icon.jpg'; +import AppIcon from 'images/oauth_icon.png'; export default class Integrations extends React.Component { static get propTypes() { @@ -17,8 +18,9 @@ export default class Integrations extends React.Component { render() { const options = []; + const config = window.mm_config; - if (window.mm_config.EnableIncomingWebhooks === 'true') { + if (config.EnableIncomingWebhooks === 'true') { options.push( <IntegrationOption key='incomingWebhook' @@ -40,7 +42,7 @@ export default class Integrations extends React.Component { ); } - if (window.mm_config.EnableOutgoingWebhooks === 'true') { + if (config.EnableOutgoingWebhooks === 'true') { options.push( <IntegrationOption key='outgoingWebhook' @@ -62,7 +64,7 @@ export default class Integrations extends React.Component { ); } - if (window.mm_config.EnableCommands === 'true') { + if (config.EnableCommands === 'true') { options.push( <IntegrationOption key='command' @@ -84,6 +86,28 @@ export default class Integrations extends React.Component { ); } + if (config.EnableOAuthServiceProvider === 'true') { + options.push( + <IntegrationOption + key='oauth2Apps' + image={AppIcon} + title={ + <FormattedMessage + id='integrations.oauthApps.title' + defaultMessage='OAuth 2.0 Applications' + /> + } + description={ + <FormattedMessage + id='integrations.oauthApps.description' + defaultMessage='Auth 2.0 allows external applications to make authorized requests to the Mattermost API.' + /> + } + link={'/' + this.props.team.name + '/integrations/oauth2-apps'} + /> + ); + } + return ( <div className='backstage-content row'> <div className='backstage-header'> |