mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
able to see the workflow if the evaluation document has been deleted
This commit is contained in:
@@ -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';
|
||||
|
Reference in New Issue
Block a user