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:
Ingo Schommer 2010-04-13 03:56:00 +00:00
parent cc522e07ae
commit 184289b3d9

View File

@ -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();