;
}
+ let createPublicChannelLink = (
+
+
+
+ );
+
+ let createPrivateChannelLink = (
+
+
+
+ );
+
+ const isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
+ const isSystemAdmin = UserStore.isSystemAdminForCurrentUser();
+
+ if (global.window.mm_license.IsLicensed === 'true') {
+ if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
+ createPublicChannelLink = null;
+ } else if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
+ createPublicChannelLink = null;
+ }
+
+ if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
+ createPrivateChannelLink = null;
+ } else if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
+ createPrivateChannelLink = null;
+ }
+ }
+
var channelTerm = '';
var channelSwitchText = '';
switch (this.props.channelType) {
@@ -129,15 +174,7 @@ class NewChannelModal extends React.Component {
id='channel_modal.privateGroup1'
defaultMessage='Create a new private group with restricted membership. '
/>
-
-
-
+ {createPublicChannelLink}
);
break;
@@ -154,15 +191,7 @@ class NewChannelModal extends React.Component {
id='channel_modal.publicChannel2'
defaultMessage='Create a new public channel anyone can join. '
/>
-
-
-
+ {createPrivateChannelLink}
);
break;
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 4f678274d..fdcae1dff 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -682,6 +682,55 @@ export default class Sidebar extends React.Component {
/>
);
+ const isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
+ const isSystemAdmin = UserStore.isSystemAdminForCurrentUser();
+
+ let createPublicChannelIcon = (
+
+
+ {'+'}
+
+
+ );
+
+ let createPrivateChannelIcon = (
+
+
+ {'+'}
+
+
+ );
+
+ if (global.window.mm_license.IsLicensed === 'true') {
+ if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
+ createPublicChannelIcon = null;
+ } else if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
+ createPublicChannelIcon = null;
+ }
+
+ if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
+ createPrivateChannelIcon = null;
+ } else if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
+ createPrivateChannelIcon = null;
+ }
+ }
+
return (
-
-
- {'+'}
-
-
+ {createPublicChannelIcon}
{publicChannelItems}
@@ -765,19 +802,7 @@ export default class Sidebar extends React.Component {
id='sidebar.pg'
defaultMessage='Private Groups'
/>
-
-
- {'+'}
-
-
+ {createPrivateChannelIcon}
{privateChannelItems}
diff --git a/webapp/components/sidebar_right_menu.jsx b/webapp/components/sidebar_right_menu.jsx
index 2cf758f00..25136e8bc 100644
--- a/webapp/components/sidebar_right_menu.jsx
+++ b/webapp/components/sidebar_right_menu.jsx
@@ -186,10 +186,10 @@ export default class SidebarRightMenu extends React.Component {
}
if (global.window.mm_license.IsLicensed === 'true') {
- if (global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_SYSTEM_ADMIN && !isSystemAdmin) {
+ if (global.window.mm_config.RestrictTeamInvite === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
teamLink = null;
inviteLink = null;
- } else if (global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_TEAM_ADMIN && !isAdmin) {
+ } else if (global.window.mm_config.RestrictTeamInvite === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
teamLink = null;
inviteLink = null;
}
diff --git a/webapp/components/tutorial/tutorial_intro_screens.jsx b/webapp/components/tutorial/tutorial_intro_screens.jsx
index b0d831d96..639fa07b2 100644
--- a/webapp/components/tutorial/tutorial_intro_screens.jsx
+++ b/webapp/components/tutorial/tutorial_intro_screens.jsx
@@ -108,7 +108,7 @@ export default class TutorialIntroScreens extends React.Component {
let inviteModalLink;
let inviteText;
- if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.RestrictTeamInvite === Constants.TEAM_INVITE_ALL) {
+ if (global.window.mm_license.IsLicensed !== 'true' || global.window.mm_config.RestrictTeamInvite === Constants.PERMISSIONS_ALL) {
if (team.type === Constants.INVITE_TEAM) {
inviteModalLink = (
Selecting \"Team and System Admins\" hides the email invitation and team invite link in the Main Menu from users who are not Team or System Admins. Note: If \"Get Team Invite Link\" is used to share a link, it will need to be regenerated after the desired users joined the team.
Selecting \"System Admins\" hides the email invitation and team invite link in the Main Menu from users who are not System Admins. Note: If \"Get Team Invite Link\" is used to share a link, it will need to be regenerated after the desired users joined the team.",
- "admin.general.policy.teamInviteSystemAdmin": "System Admins",
+ "admin.general.policy.permissionsAll": "All team members",
+ "admin.general.policy.permissionsAdmin": "Team and System Admins",
+ "admin.general.policy.permissionsSystemAdmin": "System Admins",
"admin.general.policy.teamInviteTitle": "Enable sending team invites from:",
+ "admin.general.policy.teamInviteDescription": "Selecting \"All team members\" allows any team member to invite others using an email invitation or team invite link.
Selecting \"Team and System Admins\" hides the email invitation and team invite link in the Main Menu from users who are not Team or System Admins. Note: If \"Get Team Invite Link\" is used to share a link, it will need to be regenerated after the desired users joined the team.
Selecting \"System Admins\" hides the email invitation and team invite link in the Main Menu from users who are not System Admins. Note: If \"Get Team Invite Link\" is used to share a link, it will need to be regenerated after the desired users joined the team.",
+ "admin.general.policy.restrictPublicChannelManagementTitle": "Enable public channel management permissions for:",
+ "admin.general.policy.restrictPublicChannelManagementDescription": "Selecting \"All team members\" allows any team members to create, delete, rename, and set the header or purpose for public channels.
Selecting \"Team and System Admins\" restricts channel management permissions for public channels to Team and System Admins, including creating, deleting, renaming, and setting the channel header or purpose.
Selecting \"System Admins\" restricts channel management permissions for public channels to System Admins, including creating, deleting, renaming, and setting the channel header or purpose.",
+ "admin.general.policy.restrictPrivateChannelManagementTitle": "Enable private group management permissions for:",
+ "admin.general.policy.restrictPrivateChannelManagementDescription": "Selecting \"All team members\" allows any team members to create, delete, rename, and set the header or purpose for private groups.
Selecting \"Team and System Admins\" restricts group management permissions for private groups to Team and System Admins, including creating, deleting, renaming, and setting the group header or purpose.