diff options
author | George Goldberg <george@gberg.me> | 2017-02-24 01:15:10 +0000 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-02-23 20:15:10 -0500 |
commit | 8509c2f0b0893f8a7936a1943cc924db09bb62f4 (patch) | |
tree | 9b52c232fbc96fadaec26f0694ffc7e764651757 /webapp/components/channel_header.jsx | |
parent | bc9f3dfa240b2a197859de006baf2eceaafe0fcf (diff) | |
download | chat-8509c2f0b0893f8a7936a1943cc924db09bb62f4.tar.gz chat-8509c2f0b0893f8a7936a1943cc924db09bb62f4.tar.bz2 chat-8509c2f0b0893f8a7936a1943cc924db09bb62f4.zip |
PLT-5080 (WebApp): Channel Admin permission level. (#5047)
* PLT-5080 (WebApp): Channel Admin permission level.
For channel management and channel deletion.
* Fix some incorrect showing/hiding of options.
* Remove incorrect client calls that was overwriting my channel members.
Diffstat (limited to 'webapp/components/channel_header.jsx')
-rw-r--r-- | webapp/components/channel_header.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx index 54e73cda5..ee060577c 100644 --- a/webapp/components/channel_header.jsx +++ b/webapp/components/channel_header.jsx @@ -243,6 +243,7 @@ export default class ChannelHeader extends React.Component { let channelTitle = channel.display_name; const isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser(); const isSystemAdmin = UserStore.isSystemAdminForCurrentUser(); + const isChannelAdmin = ChannelStore.isChannelAdminForCurrentChannel(); const isDirect = (this.state.channel.type === 'D'); let webrtc; @@ -476,7 +477,7 @@ export default class ChannelHeader extends React.Component { </li> ); - if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin)) { + if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin, isChannelAdmin)) { dropdownContents.push( <li key='set_channel_header' @@ -541,7 +542,7 @@ export default class ChannelHeader extends React.Component { ); } - if (ChannelUtils.showDeleteOption(channel, isAdmin, isSystemAdmin)) { + if (ChannelUtils.showDeleteOption(channel, isAdmin, isSystemAdmin, isChannelAdmin)) { if (!ChannelStore.isDefault(channel)) { dropdownContents.push(deleteOption); } |