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.
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
bc9f3dfa24
Коммит
8509c2f0b0
@@ -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) {
|
||||
|
||||
Ссылка в новой задаче
Block a user