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

38 lines
627 B
PHP
Raw Normal View History

<?php
2017-08-09 04:53:38 +02:00
namespace SilverStripe\CMS\Tests\Model;
2017-08-09 03:25:12 +02:00
use SilverStripe\Dev\TestOnly;
2024-08-29 03:54:17 +02:00
use SilverStripe\Core\Extension;
/**
* An extension that can even deny actions to admins
*/
2024-08-29 03:54:17 +02:00
class SiteTreeTest_AdminDeniedExtension extends Extension 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;
}
}