/** * Checks whether the given user has permission for the page. * * @param rex_user $rexUser * * @return bool */ public function checkPermission(rex_user $rexUser) { foreach ($this->requiredPermissions as $perm) { if (!$rexUser->hasPerm($perm)) { return false; } } if ($parent = $this->getParent()) { return $parent->checkPermission($rexUser); } return true; }