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
This commit is contained in:
Ingo Schommer 2009-11-05 01:15:15 +00:00
parent 8a940f4943
commit 966c869cd4

View File

@ -796,7 +796,7 @@ JS;
function performRollback($id, $version) { function performRollback($id, $version) {
$record = DataObject::get_by_id($this->stat('tree_class'), $id); $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); $record->doRollbackTo($version);
return $record; return $record;