/** * @return bool */ public function checkPermission() { $xoops = Xoops::getInstance(); if ($this->publisher->isUserAdmin()) { return true; } if ($xoops->isUser() && $xoops->user->getVar('uid') == $this->getVar('moderator')) { return true; } return $this->publisher->getPermissionHandler()->isGranted('category_read', $this->getVar('categoryid')); }