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
Этот коммит содержится в:
@@ -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)) {
|
||||||
if (!ChannelStore.isDefault(channel) && canLeave) {
|
|
||||||
dropdownContents.push(
|
dropdownContents.push(
|
||||||
<li
|
<li
|
||||||
key='divider-3'
|
key='divider-3'
|
||||||
|
|||||||
@@ -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)) {
|
||||||
if (!ChannelStore.isDefault(channel) && canLeave) {
|
|
||||||
leaveChannelOption = (
|
leaveChannelOption = (
|
||||||
<li role='presentation'>
|
<li role='presentation'>
|
||||||
<a
|
<a
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user