diff --git a/code/models/BaseElement.php b/code/models/BaseElement.php index 5da4e74a..e97f1a80 100644 --- a/code/models/BaseElement.php +++ b/code/models/BaseElement.php @@ -189,21 +189,37 @@ public function getCMSTitle() public function canView($member = null) { + $extended = $this->extendedCan(__FUNCTION__, $member); + if ($extended !== null) { + return $extended; + } return Permission::check('CMS_ACCESS_CMSMain', 'any', $member); } public function canEdit($member = null) { + $extended = $this->extendedCan(__FUNCTION__, $member); + if ($extended !== null) { + return $extended; + } return Permission::check('CMS_ACCESS_CMSMain', 'any', $member); } public function canDelete($member = null) { + $extended = $this->extendedCan(__FUNCTION__, $member); + if ($extended !== null) { + return $extended; + } return Permission::check('CMS_ACCESS_CMSMain', 'any', $member); } public function canCreate($member = null) { + $extended = $this->extendedCan(__FUNCTION__, $member); + if ($extended !== null) { + return $extended; + } return Permission::check('CMS_ACCESS_CMSMain', 'any', $member); } @@ -229,7 +245,8 @@ public function getPage() * * @return HTML */ - public function forTemplate($holder = true) { + public function forTemplate($holder = true) + { return $this->renderWith($this->class); }