SilverStripe\CMS\Model\SiteTree::canView
This function should return true if the current user can view this page. It can be overloaded to customise the security model for an application.
Denies permission if any of the following conditions is true: - canView() on any extension returns false - "CanViewType" directive is set to "Inherit" and any parent page return false for canView() - "CanViewType" directive is set to "LoggedInUsers" and no user is logged in - "CanViewType" directive is set to "OnlyTheseUsers" and user is not in the given groups
Signature
public function canView([Member
$member = NULL] )
Parameters
$member
— object
Returns
- bool
- True if the current user can view this page