summaryrefslogtreecommitdiffstats
path: root/webapp/components/navbar.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/navbar.jsx')
-rw-r--r--webapp/components/navbar.jsx28
1 files changed, 2 insertions, 26 deletions
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx
index 07049446d..338d4edd1 100644
--- a/webapp/components/navbar.jsx
+++ b/webapp/components/navbar.jsx
@@ -222,30 +222,6 @@ export default class Navbar extends React.Component {
});
}
- showManagementOptions(channel, isAdmin, isSystemAdmin) {
- if (global.window.mm_license.IsLicensed !== 'true') {
- return true;
- }
-
- if (channel.type === Constants.OPEN_CHANNEL) {
- if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
- return false;
- }
- if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
- return false;
- }
- } else if (channel.type === Constants.PRIVATE_CHANNEL) {
- if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_SYSTEM_ADMIN && !isSystemAdmin) {
- return false;
- }
- if (global.window.mm_config.RestrictPrivateChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) {
- return false;
- }
- }
-
- return true;
- }
-
toggleFavorite = (e) => {
e.preventDefault();
@@ -388,7 +364,7 @@ export default class Navbar extends React.Component {
</li>
);
- if (this.showManagementOptions(channel, isAdmin, isSystemAdmin)) {
+ if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin)) {
setChannelHeaderOption = (
<li role='presentation'>
<a
@@ -444,7 +420,7 @@ export default class Navbar extends React.Component {
);
}
- if (this.showManagementOptions(channel, isAdmin, isSystemAdmin) || this.state.userCount === 1) {
+ if (ChannelUtils.showDeleteOption(channel, isAdmin, isSystemAdmin) || this.state.userCount === 1) {
if (!ChannelStore.isDefault(channel)) {
deleteChannelOption = (
<li role='presentation'>