mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
8a940f4943
commit
966c869cd4
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user