diff options
Diffstat (limited to 'webapp/stores/channel_store.jsx')
-rw-r--r-- | webapp/stores/channel_store.jsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index c46e17016..f303b0190 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -377,7 +377,17 @@ class ChannelStoreClass extends EventEmitter { } isChannelAdminForCurrentChannel() { - return this.isChannelAdmin(UserStore.getCurrentId(), this.getCurrentId()); + if (!Utils) { + Utils = require('utils/utils.jsx'); //eslint-disable-line global-require + } + + const member = this.getMyMember(this.getCurrentId()); + + if (!member) { + return false; + } + + return Utils.isChannelAdmin(member.roles); } isChannelAdmin(userId, channelId) { |