getPermission('mod.chat.canMute') || PermissionHandler::get($user)->getPermission($room, 'mod.canMute'); } /** * @inheritDoc */ public function getObjectTypeName() { return 'be.bastelstu.chat.suspension.mute'; } /** * @inheritDoc */ protected function checkPermissions($parameters, Room $room, UserProfile $user) { $permission = $user->getPermission('mod.chat.canMute'); if (!$this->isGlobally($parameters)) { $permission = $permission || PermissionHandler::get($user)->getPermission($room, 'mod.canMute'); } if (!$permission) throw new PermissionDeniedException(); } }