mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Allow creating a local suspension when only the global permission is set
This commit is contained in:
parent
0025fc63ee
commit
c82eea234f
@ -91,7 +91,9 @@ public function checkPermission() {
|
|||||||
|
|
||||||
$this->room = $this->commandHandler->getRoom();
|
$this->room = $this->commandHandler->getRoom();
|
||||||
$ph = new \chat\system\permission\PermissionHandler();
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,9 @@ public function checkPermission() {
|
|||||||
|
|
||||||
$this->room = $this->commandHandler->getRoom();
|
$this->room = $this->commandHandler->getRoom();
|
||||||
$ph = new \chat\system\permission\PermissionHandler();
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user