diff --git a/file/lib/system/command/AbstractSuspensionCommand.class.php b/file/lib/system/command/AbstractSuspensionCommand.class.php index d55df8d..ee53f76 100644 --- a/file/lib/system/command/AbstractSuspensionCommand.class.php +++ b/file/lib/system/command/AbstractSuspensionCommand.class.php @@ -91,7 +91,9 @@ public function checkPermission() { $this->room = $this->commandHandler->getRoom(); $ph = new \chat\system\permission\PermissionHandler(); - if (!$ph->getPermission($this->room, 'mod.can'.ucfirst((static::IS_GLOBAL ? 'g' : '').static::SUSPENSION_TYPE))) throw new \wcf\system\exception\PermissionDeniedException(); + if (!$ph->getPermission($this->room, 'mod.can'.ucfirst((static::IS_GLOBAL ? 'g' : '').static::SUSPENSION_TYPE)) && $ph->getPermission($this->room, 'mod.canG'.static::SUSPENSION_TYPE)) { + throw new \wcf\system\exception\PermissionDeniedException(); + } } /** diff --git a/file/lib/system/command/AbstractUnsuspensionCommand.class.php b/file/lib/system/command/AbstractUnsuspensionCommand.class.php index 4c5fecf..9520eac 100644 --- a/file/lib/system/command/AbstractUnsuspensionCommand.class.php +++ b/file/lib/system/command/AbstractUnsuspensionCommand.class.php @@ -57,10 +57,12 @@ public function executeAction() { */ public function checkPermission() { parent::checkPermission(); - + $this->room = $this->commandHandler->getRoom(); $ph = new \chat\system\permission\PermissionHandler(); - if (!$ph->getPermission($this->room, 'mod.can'.ucfirst((static::IS_GLOBAL ? 'g' : '').static::SUSPENSION_TYPE))) throw new \wcf\system\exception\PermissionDeniedException(); + if (!$ph->getPermission($this->room, 'mod.can'.ucfirst((static::IS_GLOBAL ? 'g' : '').static::SUSPENSION_TYPE)) && $ph->getPermission($this->room, 'mod.canG'.static::SUSPENSION_TYPE)) { + throw new \wcf\system\exception\PermissionDeniedException(); + } } /**