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