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
This commit is contained in:
Sam Minnee 2009-08-21 02:07:35 +00:00
parent 6e9a91efca
commit 814563008a

View File

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