mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Respect permission failures from parent implementation in CMSPageHistoryController
This commit is contained in:
parent
79269a22ed
commit
ce5204f2f8
@ -82,6 +82,8 @@ class CMSPageHistoryController extends CMSMain {
|
|||||||
$versionID = ($record) ? $record->Version : $versionID;
|
$versionID = ($record) ? $record->Version : $versionID;
|
||||||
|
|
||||||
$form = parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
$form = parent::getEditForm($record, ($record) ? $record->getCMSFields() : null);
|
||||||
|
// Respect permission failures from parent implementation
|
||||||
|
if(!($form instanceof Form)) return $form;
|
||||||
|
|
||||||
$form->setActions(new FieldList(
|
$form->setActions(new FieldList(
|
||||||
$revert = FormAction::create('doRollback', _t('CMSPageHistoryController.REVERTTOTHISVERSION', 'Revert to this version'))->setUseButtonTag(true)
|
$revert = FormAction::create('doRollback', _t('CMSPageHistoryController.REVERTTOTHISVERSION', 'Revert to this version'))->setUseButtonTag(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user