diff options
author | George Goldberg <george@gberg.me> | 2017-01-02 22:35:26 +0000 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-01-02 19:35:26 -0300 |
commit | e3b8511462552dddabe257ee16d74492fdaedb2c (patch) | |
tree | 2e9224295a5209a269dfa802daa313276a42b10e /webapp/components/more_channels.jsx | |
parent | 267257b68055684f8bff94e4ae78d4b9e9c93b0b (diff) | |
download | chat-e3b8511462552dddabe257ee16d74492fdaedb2c.tar.gz chat-e3b8511462552dddabe257ee16d74492fdaedb2c.tar.bz2 chat-e3b8511462552dddabe257ee16d74492fdaedb2c.zip |
PLT-4990 (WebApp): Separate channel management permissions. (#4865)
Diffstat (limited to 'webapp/components/more_channels.jsx')
-rw-r--r-- | webapp/components/more_channels.jsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx index b0064f18a..5374c3344 100644 --- a/webapp/components/more_channels.jsx +++ b/webapp/components/more_channels.jsx @@ -9,6 +9,7 @@ import TeamStore from 'stores/team_store.jsx'; import Constants from 'utils/constants.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; +import * as ChannelUtils from 'utils/channel_utils.jsx'; import {joinChannel, searchMoreChannels} from 'actions/channel_actions.jsx'; import React from 'react'; @@ -151,14 +152,9 @@ export default class MoreChannels extends React.Component { 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) { - createNewChannelButton = null; - createChannelHelpText = null; - } else if (global.window.mm_config.RestrictPublicChannelManagement === Constants.PERMISSIONS_TEAM_ADMIN && !isAdmin) { - createNewChannelButton = null; - createChannelHelpText = null; - } + if (!ChannelUtils.showCreateOption(Constants.OPEN_CHANNEL, isAdmin, isSystemAdmin)) { + createNewChannelButton = null; + createChannelHelpText = null; } return ( |