summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-03-24 20:42:22 +0000
committerCorey Hulen <corey@hulen.com>2017-03-24 13:42:22 -0700
commit92a1878708a5f10d15a451253f139cdbbe41b8b8 (patch)
treed0a84714eb4926d6aec06c1d1398975c26c2f510 /webapp
parent11b7aa859c4b5108207b1395a91ddbc988ccf00b (diff)
downloadchat-92a1878708a5f10d15a451253f139cdbbe41b8b8.tar.gz
chat-92a1878708a5f10d15a451253f139cdbbe41b8b8.tar.bz2
chat-92a1878708a5f10d15a451253f139cdbbe41b8b8.zip
PLT-5907: Fix Create Channel in More Channels dialog. (#5830)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/more_channels.jsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx
index 10f597ad4..4ab3cca8b 100644
--- a/webapp/components/more_channels.jsx
+++ b/webapp/components/more_channels.jsx
@@ -10,6 +10,7 @@ import TeamStore from 'stores/team_store.jsx';
import Constants from 'utils/constants.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import {joinChannel, searchMoreChannels} from 'actions/channel_actions.jsx';
+import {showCreateOption} from 'utils/channel_utils.jsx';
import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
@@ -157,14 +158,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 (!showCreateOption(Constants.OPEN_CHANNEL, isAdmin, isSystemAdmin)) {
+ createNewChannelButton = null;
+ createChannelHelpText = null;
}
return (