mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
allow every person which has part for a workflow to see the workflow page
This commit is contained in:
parent
a1baf99294
commit
f64409e5e6
@ -65,7 +65,17 @@ class EntityWorkflowVoter extends Voter
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->security->isGranted($entityAttribute, $relatedEntity);
|
if ($this->security->isGranted($entityAttribute, $relatedEntity)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($subject->getSteps() as $step) {
|
||||||
|
if ($step->getAllDestUser()->contains($token->getUser())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
case self::DELETE:
|
case self::DELETE:
|
||||||
return $subject->getStep() === 'initial';
|
return $subject->getStep() === 'initial';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user