From 814563008a9bb1f15b2f788547712b49c0a1b4dc Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 21 Aug 2009 02:07:35 +0000 Subject: [PATCH] BUGFIX: Tied rollback action to edit, rather than publish, permission, since it only involves editing the draft site. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@84957 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 30140ff0..7ebadf18 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -716,7 +716,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;