able to see the workflow if the evaluation document has been deleted

This commit is contained in:
2022-04-07 15:54:53 +02:00
parent d9bb18e042
commit a1baf99294
4 changed files with 145 additions and 122 deletions

View File

@@ -59,7 +59,13 @@ class EntityWorkflowVoter extends Voter
return true;
}
return $this->security->isGranted($entityAttribute, $handler->getRelatedEntity($subject));
$relatedEntity = $handler->getRelatedEntity($subject);
if (null === $relatedEntity) {
return true;
}
return $this->security->isGranted($entityAttribute, $relatedEntity);
case self::DELETE:
return $subject->getStep() === 'initial';