transition added + attempt voter

This commit is contained in:
2021-11-19 08:37:56 +01:00
parent e9e3b85518
commit a20d7222a8
3 changed files with 19 additions and 6 deletions

View File

@@ -78,6 +78,12 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRole
return false;
}
if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) {
if($this->security->isGranted(self::EDIT, $subject)) {
return false;
}
}
// if confidential, only the referent can see it
if ($subject->isConfidential()) {
return $token->getUser() === $subject->getUser();