use wcf\data\page\content\PageContentList;
use wcf\data\page\Page;
use wcf\page\AbstractPage;
-use wcf\system\acl\simple\SimpleAclResolver;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
/** @var $object PageContent */
$page = new Page($object->pageID);
- if ($page->isDisabled) {
- return false;
- }
-
if ($page->requireObjectID) {
return false;
}
- if (!$page->validateOptions()) {
- return false;
- }
-
- if (!$page->validatePermissions()) {
+ if (!$page->isVisible()) {
return false;
}
- if (!SimpleAclResolver::getInstance()->canAccess('com.woltlab.wcf.page', $object->pageID)) {
+ if (!$page->isAccessible()) {
return false;
}
use wcf\data\page\Page;
use wcf\data\page\PageList;
use wcf\page\AbstractPage;
-use wcf\system\acl\simple\SimpleAclResolver;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
*/
public function canView(DatabaseObject $object)
{
- /** @var Page $object */
- if ($object->isDisabled) {
- return false;
- }
+ \assert($object instanceof Page);
if ($object->requireObjectID) {
return false;
}
- if (!$object->validateOptions()) {
- return false;
- }
-
- if (!$object->validatePermissions()) {
+ if (!$object->isVisible()) {
return false;
}
- if (!SimpleAclResolver::getInstance()->canAccess('com.woltlab.wcf.page', $object->pageID)) {
+ if (!$object->isAccessible()) {
return false;
}