mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Use canDeleteFromLive instead of canPublish for checking delete from live action (from r93316) (from r96817)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102679 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cc522e07ae
commit
184289b3d9
@ -787,7 +787,8 @@ JS;
|
||||
|
||||
function unpublish($data, $form) {
|
||||
$page = DataObject::get_by_id("SiteTree", $data['ID']);
|
||||
if($page && !$page->canPublish()) return Security::permissionFailure($this);
|
||||
|
||||
if($page && !$page->canDeleteFromLive()) return Security::permissionFailure($this);
|
||||
|
||||
$page->doUnpublish();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user