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/navbar_dropdown.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/navbar_dropdown.jsx')
-rw-r--r-- | webapp/components/navbar_dropdown.jsx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx index f82bd564e..39bd6b159 100644 --- a/webapp/components/navbar_dropdown.jsx +++ b/webapp/components/navbar_dropdown.jsx @@ -99,6 +99,7 @@ export default class NavbarDropdown extends React.Component { } render() { + const config = global.window.mm_config; var teamLink = ''; var inviteLink = ''; var manageLink = ''; @@ -131,7 +132,7 @@ export default class NavbarDropdown extends React.Component { </li> ); - if (this.props.teamType === Constants.OPEN_TEAM && global.window.mm_config.EnableUserCreation === 'true') { + if (this.props.teamType === Constants.OPEN_TEAM && config.EnableUserCreation === 'true') { teamLink = ( <li> <a @@ -148,10 +149,10 @@ export default class NavbarDropdown extends React.Component { } if (global.window.mm_license.IsLicensed === 'true') { - if (global.window.mm_config.RestrictTeamInvite === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) { + if (config.RestrictTeamInvite === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) { teamLink = null; inviteLink = null; - } else if (global.window.mm_config.RestrictTeamInvite === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) { + } else if (config.RestrictTeamInvite === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) { teamLink = null; inviteLink = null; } @@ -201,10 +202,11 @@ export default class NavbarDropdown extends React.Component { ); const integrationsEnabled = - window.mm_config.EnableIncomingWebhooks === 'true' || - window.mm_config.EnableOutgoingWebhooks === 'true' || - window.mm_config.EnableCommands === 'true'; - if (integrationsEnabled && (isAdmin || window.mm_config.EnableOnlyAdminIntegrations !== 'true')) { + config.EnableIncomingWebhooks === 'true' || + config.EnableOutgoingWebhooks === 'true' || + config.EnableCommands === 'true' || + config.EnableOAuthServiceProvider === 'true'; + if (integrationsEnabled && (isAdmin || config.EnableOnlyAdminIntegrations !== 'true')) { integrationsLink = ( <li> <Link to={'/' + this.props.teamName + '/integrations'}> @@ -234,7 +236,7 @@ export default class NavbarDropdown extends React.Component { var teams = []; - if (global.window.mm_config.EnableTeamCreation === 'true') { + if (config.EnableTeamCreation === 'true') { teams.push( <li key='newTeam_li'> <Link @@ -297,13 +299,13 @@ export default class NavbarDropdown extends React.Component { } let helpLink = null; - if (global.window.mm_config.HelpLink) { + if (config.HelpLink) { helpLink = ( <li> <Link target='_blank' rel='noopener noreferrer' - to={global.window.mm_config.HelpLink} + to={config.HelpLink} > <FormattedMessage id='navbar_dropdown.help' @@ -315,13 +317,13 @@ export default class NavbarDropdown extends React.Component { } let reportLink = null; - if (global.window.mm_config.ReportAProblemLink) { + if (config.ReportAProblemLink) { reportLink = ( <li> <Link target='_blank' rel='noopener noreferrer' - to={global.window.mm_config.ReportAProblemLink} + to={config.ReportAProblemLink} > <FormattedMessage id='navbar_dropdown.report' |