Fixed permission denied exception when time traveling.

This commit is contained in:
Jan Böhmer 2020-03-07 23:04:41 +01:00
parent 28eade1c3a
commit 774e025a24
2 changed files with 2 additions and 2 deletions

View file

@ -119,7 +119,7 @@ abstract class BaseAdminController extends AbstractController
$timeTravel_timestamp = null; $timeTravel_timestamp = null;
if ($timestamp !== null) { if ($timestamp !== null) {
$this->denyAccessUnlessGranted('@tools.timeTravel'); $this->denyAccessUnlessGranted('@tools.timetravel');
$this->denyAccessUnlessGranted('show_history', $entity); $this->denyAccessUnlessGranted('show_history', $entity);
//If the timestamp only contains numbers interpret it as unix timestamp //If the timestamp only contains numbers interpret it as unix timestamp
if (ctype_digit($timestamp)) { if (ctype_digit($timestamp)) {

View file

@ -98,7 +98,7 @@ class PartController extends AbstractController
$timeTravel_timestamp = null; $timeTravel_timestamp = null;
if ($timestamp !== null) { if ($timestamp !== null) {
$this->denyAccessUnlessGranted('@tools.timeTravel'); $this->denyAccessUnlessGranted('@tools.timetravel');
$this->denyAccessUnlessGranted('show_history', $part); $this->denyAccessUnlessGranted('show_history', $part);
//If the timestamp only contains numbers interpret it as unix timestamp //If the timestamp only contains numbers interpret it as unix timestamp
if (ctype_digit($timestamp)) { if (ctype_digit($timestamp)) {