diff options
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'> |