mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Removing class comparison in SiteTree->canCreate() (mainly in order to enable overloading via SiteTreeSubsite->canCreate())
This commit is contained in:
parent
4903fad537
commit
45f857e042
@ -2302,7 +2302,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$result = array();
|
||||
foreach($classes as $class) {
|
||||
$instance = singleton($class);
|
||||
if((($instance instanceof HiddenClass) || !$instance->canCreate()) && ($class != $this->class)) continue;
|
||||
if((($instance instanceof HiddenClass) || !$instance->canCreate())) continue;
|
||||
|
||||
if($perms = $instance->stat('need_permission')) {
|
||||
if(!$this->can($perms)) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user