From 966c869cd46e016c17cd243478270de7d1396139 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 5 Nov 2009 01:15:15 +0000 Subject: [PATCH] BUGFIX: Tied rollback action to edit, rather than publish, permission, since it only involves editing the draft site. (from r84957) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@90852 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index fd74cadf..20f239af 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -796,7 +796,7 @@ JS; function performRollback($id, $version) { $record = DataObject::get_by_id($this->stat('tree_class'), $id); - if($record && !$record->canPublish()) return Security::permissionFailure($this); + if($record && !$record->canEdit()) return Security::permissionFailure($this); $record->doRollbackTo($version); return $record;