summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_members_dropdown.jsx
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-04-04 19:43:22 +0100
committerHarrison Healey <harrisonmhealey@gmail.com>2017-04-04 14:43:22 -0400
commit6bb65ef420fba17ec02e9b8005ca58bb60321cdc (patch)
treea7f07fd4ae05c92ed0f0fa5496277514e5d1c59e /webapp/components/channel_members_dropdown.jsx
parent6bf080393d88534aa658ecaff32ae089bd304772 (diff)
downloadchat-6bb65ef420fba17ec02e9b8005ca58bb60321cdc.tar.gz
chat-6bb65ef420fba17ec02e9b8005ca58bb60321cdc.tar.bz2
chat-6bb65ef420fba17ec02e9b8005ca58bb60321cdc.zip
PLT-6139 (WebApp): Manage Private Channel Members (#5947)
Honour the policy setting for add/remove members from private channels in the WebApp UI.
Diffstat (limited to 'webapp/components/channel_members_dropdown.jsx')
-rw-r--r--webapp/components/channel_members_dropdown.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/channel_members_dropdown.jsx b/webapp/components/channel_members_dropdown.jsx
index 5ccdcd4c1..8c8c7dc3a 100644
--- a/webapp/components/channel_members_dropdown.jsx
+++ b/webapp/components/channel_members_dropdown.jsx
@@ -9,6 +9,7 @@ import {removeUserFromChannel, makeUserChannelAdmin, makeUserChannelMember} from
import * as AsyncClient from 'utils/async_client.jsx';
import * as Utils from 'utils/utils.jsx';
+import {canManageMembers} from 'utils/channel_utils.jsx';
import React from 'react';
import {FormattedMessage} from 'react-intl';
@@ -91,8 +92,7 @@ export default class ChannelMembersDropdown extends React.Component {
// Checks if the current user has the power to remove this member from the channel.
canRemoveMember() {
- // TODO: This will be implemented as part of PLT-5047.
- return true;
+ return canManageMembers(this.props.channel, UserStore.isSystemAdminForCurrentUser(), TeamStore.isTeamAdminForCurrentTeam(), ChannelStore.isChannelAdminForCurrentChannel());
}
render() {