voters adjusted

This commit is contained in:
2021-11-19 11:29:29 +01:00
parent fc8a766c25
commit f145d6c921
4 changed files with 27 additions and 7 deletions

View File

@@ -112,6 +112,12 @@ final class TaskVoter extends AbstractChillVoter implements ProvideRoleHierarchy
if (!$this->accessDecisionManager->decide($token, [AccompanyingPeriodVoter::SEE], $period)) {
return false;
}
if (AccompanyingPeriod::STEP_CLOSED === $subject->getCourse()->getStep()) {
if (\in_array($attribute, [self::UPDATE, self::CREATE_COURSE, self::DELETE])) {
return false;
}
}
}
}