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.
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:
parent
6e9a91efca
commit
814563008a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user