src/BoomCMS/Policies/PagePolicy.php
public function view(Person $person, Page $page)
    {
        if (!$page->aclEnabled()) {
            return true;
        }

        if ($page->wasCreatedBy($person) || $this->managesPages()) {
            return true;
        }

        $aclGroupIds = $page->getAclGroupIds();

        if (count($aclGroupIds) === 0) {
            return true;
        }

        $groups = $person->getGroups();

        foreach ($groups as $group) {
            if ($aclGroupIds->contains($group->getId())) {
                return true;
            }
        }

        return false;
    }
public function view(Person $person, Page $page)
    {
        if (!$page->aclEnabled()) {
            return true;
        }

        if ($page->wasCreatedBy($person) || $this->managesPages()) {
            return true;
        }

        $aclGroupIds = $page->getAclGroupIds();

        if (count($aclGroupIds) === 0) {
            return true;
        }

        $groups = $person->getGroups();

        foreach ($groups as $group) {
            if ($aclGroupIds->contains($group->getId())) {
                return true;
            }
        }

        return false;
    }
public function view ( Person $ person , Page $ page ) { if ( ! $ page -> aclEnabled ( ) ) { return true ; } if ( $ page -> wasCreatedBy ( $ person ) || $ this -> managesPages ( ) ) { return true ; } $ aclGroupIds = $ page -> getAclGroupIds ( ) ; if ( count ( $ aclGroupIds ) === 0 ) { return true ; } $ groups = $ person -> getGroups ( ) ; foreach ( $ groups as $ group ) { if ( $ aclGroupIds -> contains ( $ group -> getId ( ) ) ) { return true ; } } return false ; }
Whether the page can be viewed.

@param Person $person
@param Page   $page

@return bool
Whether the page can be viewed .