summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJonathan <jonfritz@gmail.com>2017-08-30 14:25:19 -0400
committerGitHub <noreply@github.com>2017-08-30 14:25:19 -0400
commit4660127fd035dfb7a4d002919ad1cdc246747597 (patch)
tree2a1fe43a9b30c11cec87ec60ee2906b838c30850 /webapp
parent651dd33b29b7b8b296cc5a12479684fa836867b1 (diff)
downloadchat-4660127fd035dfb7a4d002919ad1cdc246747597.tar.gz
chat-4660127fd035dfb7a4d002919ad1cdc246747597.tar.bz2
chat-4660127fd035dfb7a4d002919ad1cdc246747597.zip
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
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/channel_header.jsx3
-rw-r--r--webapp/components/navbar.jsx3
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(
<li
key='divider-3'
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx
index 25c458523..43411c2cf 100644
--- a/webapp/components/navbar.jsx
+++ b/webapp/components/navbar.jsx
@@ -555,8 +555,7 @@ export default class Navbar extends React.Component {
);
}
- const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true;
- if (!ChannelStore.isDefault(channel) && canLeave) {
+ if (!ChannelStore.isDefault(channel)) {
leaveChannelOption = (
<li role='presentation'>
<a