code/SiteConfig.php
public function canViewPages($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

        if ($member && Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        $extended = $this->extendedCan('canViewPages', $member);
        if ($extended !== null) {
            return $extended;
        }

        if (!$this->CanViewType || $this->CanViewType == 'Anyone') {
            return true;
        }

        // check for any logged-in users
        if ($this->CanViewType === 'LoggedInUsers' && $member) {
            return true;
        }

        // check for specific groups
        if ($this->CanViewType === 'OnlyTheseUsers' && $member && $member->inGroups($this->ViewerGroups())) {
            return true;
        }

        return false;
    }
public function canViewPages($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

        if ($member && Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        $extended = $this->extendedCan('canViewPages', $member);
        if ($extended !== null) {
            return $extended;
        }

        if (!$this->CanViewType || $this->CanViewType == 'Anyone') {
            return true;
        }

        // check for any logged-in users
        if ($this->CanViewType === 'LoggedInUsers' && $member) {
            return true;
        }

        // check for specific groups
        if ($this->CanViewType === 'OnlyTheseUsers' && $member && $member->inGroups($this->ViewerGroups())) {
            return true;
        }

        return false;
    }
public function canViewPages ( $ member = null ) { if ( ! $ member ) { $ member = Security :: getCurrentUser ( ) ; } if ( $ member && Permission :: checkMember ( $ member , "ADMIN" ) ) { return true ; } $ extended = $ this -> extendedCan ( 'canViewPages' , $ member ) ; if ( $ extended !== null ) { return $ extended ; } if ( ! $ this -> CanViewType || $ this -> CanViewType == 'Anyone' ) { return true ; } // check for any logged-in users if ( $ this -> CanViewType === 'LoggedInUsers' && $ member ) { return true ; } // check for specific groups if ( $ this -> CanViewType === 'OnlyTheseUsers' && $ member && $ member -> inGroups ( $ this -> ViewerGroups ( ) ) ) { return true ; } return false ; }
Can a user view pages on this site? This method is only
called if a page is set to Inherit, but there is nothing
to inherit from.

@param Member $member
@return boolean
Can a user view pages on this site? This method is only called if a page is set to Inherit but there is nothing to inherit from .