diff options
Diffstat (limited to 'webapp/components/channel_members_modal.jsx')
-rw-r--r-- | webapp/components/channel_members_modal.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webapp/components/channel_members_modal.jsx b/webapp/components/channel_members_modal.jsx index 55250d5c5..d20c00623 100644 --- a/webapp/components/channel_members_modal.jsx +++ b/webapp/components/channel_members_modal.jsx @@ -145,11 +145,16 @@ export default class ChannelMembersModal extends React.Component { maxHeight = Utils.windowHeight() - 300; } + let removeButton = null; + if (this.props.isAdmin) { + removeButton = [this.createRemoveMemberButton]; + } + content = ( <FilteredUserList style={{maxHeight}} users={this.state.memberList} - actions={[this.createRemoveMemberButton]} + actions={removeButton} /> ); } @@ -218,5 +223,6 @@ ChannelMembersModal.defaultProps = { ChannelMembersModal.propTypes = { show: React.PropTypes.bool.isRequired, onModalDismissed: React.PropTypes.func.isRequired, - channel: React.PropTypes.object.isRequired + channel: React.PropTypes.object.isRequired, + isAdmin: React.PropTypes.bool.isRequired }; |