silverstripe-cms/tests/php/Model/SiteTreeActionsTest_Page.php
2022-08-25 10:17:41 +12:00

21 lines
514 B
PHP

<?php
namespace SilverStripe\CMS\Tests\Model;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Security\Permission;
use SilverStripe\CMS\Model\SiteTree;
class SiteTreeActionsTest_Page extends SiteTree implements TestOnly
{
public function canEdit($member = null)
{
return Permission::checkMember($member, 'SiteTreeActionsTest_Page_CANEDIT');
}
public function canDelete($member = null)
{
return Permission::checkMember($member, 'SiteTreeActionsTest_Page_CANDELETE');
}
}