silverstripe-framework/src/Security/DefaultPermissionChecker.php
Damian Mooyman 0b70b008b3 API Implement InheritedPermission calculator (#6877)
* API Implement InheritedPermission calculator

* API Rename RootPermissions to DefaultPermissionChecker
API Refactor inherited permission fields into InheritedPermissionExtension
API Introduce PermissionChecker interface
2017-05-11 21:07:27 +12:00

45 lines
950 B
PHP

<?php
namespace SilverStripe\Security;
/**
* Allows objects to enforce permissions for the "root" level,
* where permissions can not be tied to a particular database record.
* Objects below the "root" level should use their own can*()
* implementations instead of this interface.
*/
interface DefaultPermissionChecker
{
/**
* Can root be edited?
*
* @param Member $member
* @return bool
*/
public function canEdit(Member $member = null);
/**
* Can root be viewed?
*
* @param Member $member
* @return bool
*/
public function canView(Member $member = null);
/**
* Can root be deleted?
*
* @param Member $member
* @return bool
*/
public function canDelete(Member $member = null);
/**
* Can root objects be created?
*
* @param Member $member
* @return bool
*/
public function canCreate(Member $member = null);
}