From b97b3ae6179bc15ec23e0697b08cdcbdf53e4ffc Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 29 Jun 2016 14:16:17 -0400 Subject: EE: Add the ability to restrict the user roles that can send team invites (#3442) --- webapp/components/navbar_dropdown.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'webapp/components/navbar_dropdown.jsx') diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx index 9d6d7fb22..c3b646e52 100644 --- a/webapp/components/navbar_dropdown.jsx +++ b/webapp/components/navbar_dropdown.jsx @@ -119,6 +119,16 @@ export default class NavbarDropdown extends React.Component { ); } + + if (global.window.mm_license.IsLicensed === 'true') { + if (global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_SYSTEM_ADMIN && !isSystemAdmin) { + teamLink = null; + inviteLink = null; + } else if (global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_TEAM_ADMIN && !isAdmin) { + teamLink = null; + inviteLink = null; + } + } } if (isAdmin) { -- cgit v1.2.3-1-g7c22