summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_members_modal.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-15 09:51:56 -0500
committerenahum <nahumhbl@gmail.com>2016-12-15 11:51:56 -0300
commitc35b95709e293680f882f27ab6e616bf8f92a7cc (patch)
tree456adae7bd20257e5eba2f0f78589ae8d2cde683 /webapp/components/channel_members_modal.jsx
parentd88b4ef888c25df05e2f7c6ca5cd73da15cf7fe9 (diff)
downloadchat-c35b95709e293680f882f27ab6e616bf8f92a7cc.tar.gz
chat-c35b95709e293680f882f27ab6e616bf8f92a7cc.tar.bz2
chat-c35b95709e293680f882f27ab6e616bf8f92a7cc.zip
Allow any user in a channel to remove other users (#4806)
Diffstat (limited to 'webapp/components/channel_members_modal.jsx')
-rw-r--r--webapp/components/channel_members_modal.jsx10
1 files changed, 2 insertions, 8 deletions
diff --git a/webapp/components/channel_members_modal.jsx b/webapp/components/channel_members_modal.jsx
index b5ca024f2..3722195b9 100644
--- a/webapp/components/channel_members_modal.jsx
+++ b/webapp/components/channel_members_modal.jsx
@@ -143,11 +143,6 @@ export default class ChannelMembersModal extends React.Component {
if (this.state.loading) {
content = (<LoadingScreen/>);
} else {
- let removeButton = null;
- if (this.props.isAdmin) {
- removeButton = [this.createRemoveMemberButton];
- }
-
content = (
<SearchableUserList
users={this.state.users}
@@ -155,7 +150,7 @@ export default class ChannelMembersModal extends React.Component {
total={this.state.total}
nextPage={this.nextPage}
search={this.search}
- actions={removeButton}
+ actions={[this.createRemoveMemberButton]}
focusOnMount={!UserAgent.isMobile()}
/>
);
@@ -205,6 +200,5 @@ export default class ChannelMembersModal extends React.Component {
ChannelMembersModal.propTypes = {
onModalDismissed: React.PropTypes.func.isRequired,
showInviteModal: React.PropTypes.func.isRequired,
- channel: React.PropTypes.object.isRequired,
- isAdmin: React.PropTypes.bool.isRequired
+ channel: React.PropTypes.object.isRequired
};