From 184289b3d90b57b06f8ed4d0717d0814914fee89 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 03:56:00 +0000 Subject: [PATCH] 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 --- code/CMSMain.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 68cd0f09..21972e13 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -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();