silverstripe-cms/tests/php/Model/SiteTreeTest_AdminDeniedExtension.php

38 lines
634 B
PHP
Raw Normal View History

<?php
2017-08-09 14:53:38 +12:00
namespace SilverStripe\CMS\Tests\Model;
2017-08-09 13:25:12 +12:00
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataExtension;
/**
* An extension that can even deny actions to admins
*/
class SiteTreeTest_AdminDeniedExtension extends DataExtension implements TestOnly
{
protected function canCreate($member)
{
return false;
}
protected function canEdit($member)
{
return false;
}
protected function canDelete($member)
{
return false;
}
protected function canAddChildren()
{
return false;
}
protected function canView()
{
return false;
}
}