SilverStripe\CMS\Model\SiteTree::canEdit
This function should return true if the current user can edit this page. It can be overloaded to customise the security model for an application.
Denies permission if any of the following conditions is true: - canEdit() on any extension returns false - canView() return false - "CanEditType" directive is set to "Inherit" and any parent page return false for canEdit() - "CanEditType" directive is set to "LoggedInUsers" and no user is logged in or doesn't have the CMS_Access_CMSMAIN permission code - "CanEditType" directive is set to "OnlyTheseUsers" and user is not in the given groups
Signature
public function canEdit([Member
$member = NULL] )
Parameters
$member
— object- Set to false if you want to explicitly test permissions without a valid user (useful for
unit tests)
Returns
- bool
- True if the current user can edit this page