BUGFIX: delete from published site never calls canDeleteFromLive(). (via marcus #5364)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@102386 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2010-04-12 03:02:05 +00:00 committed by Sam Minnee
parent a3e8e4e60d
commit b7a9287844

View File

@ -595,7 +595,7 @@ JS;
$id = $_REQUEST['ID'];
Versioned::reading_stage('Live');
$record = DataObject::get_by_id("SiteTree", $id);
if($record && !$record->canDelete()) return Security::permissionFailure($this);
if($record && !($record->canDelete() && $record->canDeleteFromLive())) return Security::permissionFailure($this);
$descRemoved = '';
$descendantsRemoved = 0;