mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #30 from frankmullenger/master
Removing Unpublish button from CMS when canDeleteFromLive() returns false
This commit is contained in:
commit
d63bcb63ae
@ -2045,7 +2045,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
return $actions;
|
||||
}
|
||||
|
||||
if($this->isPublished() && $this->canPublish() && !$this->IsDeletedFromStage) {
|
||||
if($this->isPublished() && $this->canPublish() && !$this->IsDeletedFromStage && $this->canDeleteFromLive()) {
|
||||
// "unpublish"
|
||||
$unpublish = FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete');
|
||||
$unpublish->describe(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'));
|
||||
|
Loading…
Reference in New Issue
Block a user