diff options
Diffstat (limited to 'webapp/components/backstage/components/backstage_sidebar.jsx')
-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> ); } |