2017-06-21 16:29:40 +12:00
|
|
|
<?php
|
|
|
|
|
2017-08-09 14:53:38 +12:00
|
|
|
namespace SilverStripe\CMS\Tests\Model;
|
2017-08-09 13:25:12 +12:00
|
|
|
|
2017-06-21 16:29:40 +12:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2024-08-29 13:54:17 +12:00
|
|
|
use SilverStripe\Core\Extension;
|
2017-06-21 16:29:40 +12:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An extension that can even deny actions to admins
|
|
|
|
*/
|
2024-08-29 13:54:17 +12:00
|
|
|
class SiteTreeTest_AdminDeniedExtension extends Extension implements TestOnly
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
2024-08-27 15:39:17 +12:00
|
|
|
protected function canCreate($member)
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-08-27 15:39:17 +12:00
|
|
|
protected function canEdit($member)
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-08-27 15:39:17 +12:00
|
|
|
protected function canDelete($member)
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-08-27 15:39:17 +12:00
|
|
|
protected function canAddChildren()
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-08-27 15:39:17 +12:00
|
|
|
protected function canView()
|
2017-06-21 16:29:40 +12:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|