From 4660127fd035dfb7a4d002919ad1cdc246747597 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 30 Aug 2017 14:25:19 -0400 Subject: PLT-7206: Remove the "Delete Channel" option for private channels if you're the last channel member and policy setting restricts channel deletion (#7314) * Removed restriction that prevented last occupant of a channel from leaving. Any user can now leave any channel, except for the default Town Square channel * Also removed last user leave limitation from navbar --- webapp/components/channel_header.jsx | 3 +-- webapp/components/navbar.jsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx index f89c18745..29498eef2 100644 --- a/webapp/components/channel_header.jsx +++ b/webapp/components/channel_header.jsx @@ -680,8 +680,7 @@ export default class ChannelHeader extends React.Component { ); } - const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true; - if (!ChannelStore.isDefault(channel) && canLeave) { + if (!ChannelStore.isDefault(channel)) { dropdownContents.push(
  • 1 : true; - if (!ChannelStore.isDefault(channel) && canLeave) { + if (!ChannelStore.isDefault(channel)) { leaveChannelOption = (