You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Merge pull request #3437 from matrix-org/travis/fix-deactivate
Wrap deactivation check with sanity conditions
This commit is contained in:
@@ -641,10 +641,15 @@ module.exports = createReactClass({
|
||||
},
|
||||
|
||||
_calculateOpsPermissions: async function(member) {
|
||||
let canDeactivate = false;
|
||||
if (this.context.matrixClient) {
|
||||
canDeactivate = await this.context.matrixClient.isSynapseAdministrator();
|
||||
}
|
||||
|
||||
const defaultPerms = {
|
||||
can: {
|
||||
// Calculate permissions for Synapse before doing the PL checks
|
||||
synapseDeactivate: await this.context.matrixClient.isSynapseAdministrator(),
|
||||
synapseDeactivate: canDeactivate,
|
||||
},
|
||||
muted: false,
|
||||
};
|
||||
@@ -668,7 +673,7 @@ module.exports = createReactClass({
|
||||
};
|
||||
},
|
||||
|
||||
_calculateCanPermissions: async function(me, them, powerLevels) {
|
||||
_calculateCanPermissions: function(me, them, powerLevels) {
|
||||
const isMe = me.userId === them.userId;
|
||||
const can = {
|
||||
kick: false,
|
||||
|
||||
Reference in New Issue
Block a user