mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Removed timetravel permission
Now it is sufficient enough to have the show_history permission
This commit is contained in:
parent
70120bdaa9
commit
ae4cb23b18
4 changed files with 1 additions and 8 deletions
|
@ -112,9 +112,6 @@ perms: # Here comes a list with all Permission names (they have a perm_[name] co
|
|||
label: "perm.tools.statistics"
|
||||
lastActivity:
|
||||
label: "perm.tools.lastActivity"
|
||||
timetravel:
|
||||
label: "perm.tools.timeTravel"
|
||||
alsoSet: 'parts.show_history'
|
||||
label_scanner:
|
||||
label: "perm.tools.label_scanner"
|
||||
reel_calculator:
|
||||
|
|
|
@ -143,7 +143,6 @@ abstract class BaseAdminController extends AbstractController
|
|||
protected function revertElementIfNeeded(AbstractDBElement $entity, ?string $timestamp): ?DateTime
|
||||
{
|
||||
if (null !== $timestamp) {
|
||||
$this->denyAccessUnlessGranted('@tools.timetravel');
|
||||
$this->denyAccessUnlessGranted('show_history', $entity);
|
||||
//If the timestamp only contains numbers interpret it as unix timestamp
|
||||
if (ctype_digit($timestamp)) {
|
||||
|
|
|
@ -102,7 +102,6 @@ class PartController extends AbstractController
|
|||
|
||||
$timeTravel_timestamp = null;
|
||||
if (null !== $timestamp) {
|
||||
$this->denyAccessUnlessGranted('@tools.timetravel');
|
||||
$this->denyAccessUnlessGranted('show_history', $part);
|
||||
//If the timestamp only contains numbers interpret it as unix timestamp
|
||||
if (ctype_digit($timestamp)) {
|
||||
|
|
|
@ -260,9 +260,7 @@ class LogDataTable implements DataTableTypeInterface
|
|||
return null;
|
||||
},
|
||||
'disabled' => function ($value, AbstractLogEntry $context) {
|
||||
return
|
||||
!$this->security->isGranted('@tools.timetravel')
|
||||
|| !$this->security->isGranted('show_history', $context->getTargetClass());
|
||||
return !$this->security->isGranted('show_history', $context->getTargetClass());
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue