diff options
author | Asaad Mahmood <asaadmahmood@users.noreply.github.com> | 2017-01-06 19:04:11 +0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-01-06 09:04:11 -0500 |
commit | 28d07758fc77591a08ebc4f8a0c5696eda8935d5 (patch) | |
tree | 59edfb1ee48fb3f177a7e96caa4ce85f780c52e2 /webapp/components/more_channels.jsx | |
parent | 0c0635d766f61eb25db52e4e11706932185e416d (diff) | |
download | chat-28d07758fc77591a08ebc4f8a0c5696eda8935d5.tar.gz chat-28d07758fc77591a08ebc4f8a0c5696eda8935d5.tar.bz2 chat-28d07758fc77591a08ebc4f8a0c5696eda8935d5.zip |
Bug fixes for search and direct messages (#4986)
* PLT-5145 - Fixing search popover on mobile
* PLT-5093 - Fixing direct messages list height
Diffstat (limited to 'webapp/components/more_channels.jsx')
-rw-r--r-- | webapp/components/more_channels.jsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx index 783aeff50..e4cff451d 100644 --- a/webapp/components/more_channels.jsx +++ b/webapp/components/more_channels.jsx @@ -9,7 +9,6 @@ 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'; @@ -152,14 +151,19 @@ export default class MoreChannels extends React.Component { const isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser(); const isSystemAdmin = UserStore.isSystemAdminForCurrentUser(); - if (!ChannelUtils.showCreateOption(Constants.OPEN_CHANNEL, isAdmin, isSystemAdmin)) { - createNewChannelButton = null; - createChannelHelpText = null; + 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; + } } return ( <Modal - dialogClassName='more-modal more-public-channels' + dialogClassName='more-modal more-modal--action' show={this.state.show} onHide={this.handleHide} onExited={this.handleExit} @@ -192,4 +196,4 @@ export default class MoreChannels extends React.Component { MoreChannels.propTypes = { onModalDismissed: React.PropTypes.func, handleNewChannel: React.PropTypes.func -}; +};
\ No newline at end of file |