diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-06-29 14:16:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 14:16:17 -0400 |
commit | b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc (patch) | |
tree | 8b0b4438a88c044e63eb3520224bdf6b85b5c74b /webapp/components/tutorial | |
parent | 4c9b48da8f54bc9af83c7e987149be316f5c61f7 (diff) | |
download | chat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.tar.gz chat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.tar.bz2 chat-b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc.zip |
EE: Add the ability to restrict the user roles that can send team invites (#3442)
Diffstat (limited to 'webapp/components/tutorial')
-rw-r--r-- | webapp/components/tutorial/tutorial_intro_screens.jsx | 67 |
1 files changed, 37 insertions, 30 deletions
diff --git a/webapp/components/tutorial/tutorial_intro_screens.jsx b/webapp/components/tutorial/tutorial_intro_screens.jsx index 3928b7f20..b0d831d96 100644 --- a/webapp/components/tutorial/tutorial_intro_screens.jsx +++ b/webapp/components/tutorial/tutorial_intro_screens.jsx @@ -106,32 +106,45 @@ export default class TutorialIntroScreens extends React.Component { createScreenThree() { const team = TeamStore.getCurrent(); let inviteModalLink; + let inviteText; - if (team.type === Constants.INVITE_TEAM) { - inviteModalLink = ( - <a - className='intro-links' - href='#' - onClick={GlobalActions.showInviteMemberModal} - > - <FormattedMessage - id='tutorial_intro.invite' - defaultMessage='Invite teammates' - /> - </a> - ); - } else { - inviteModalLink = ( - <a - className='intro-links' - href='#' - onClick={GlobalActions.showGetTeamInviteLinkModal} - > + if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_ALL) { + if (team.type === Constants.INVITE_TEAM) { + inviteModalLink = ( + <a + className='intro-links' + href='#' + onClick={GlobalActions.showInviteMemberModal} + > + <FormattedMessage + id='tutorial_intro.invite' + defaultMessage='Invite teammates' + /> + </a> + ); + } else { + inviteModalLink = ( + <a + className='intro-links' + href='#' + onClick={GlobalActions.showGetTeamInviteLinkModal} + > + <FormattedMessage + id='tutorial_intro.teamInvite' + defaultMessage='Invite teammates' + /> + </a> + ); + } + + inviteText = ( + <p> + {inviteModalLink} <FormattedMessage - id='tutorial_intro.teamInvite' - defaultMessage='Invite teammates' + id='tutorial_intro.whenReady' + defaultMessage=' when you’re ready.' /> - </a> + </p> ); } @@ -170,13 +183,7 @@ export default class TutorialIntroScreens extends React.Component { defaultMessage='You’re all set' /> </h3> - <p> - {inviteModalLink} - <FormattedMessage - id='tutorial_intro.whenReady' - defaultMessage=' when you’re ready.' - /> - </p> + {inviteText} {supportInfo} <FormattedMessage id='tutorial_intro.end' |