mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
45 lines
950 B
PHP
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);
|
||
|
}
|