voter fixes

This commit is contained in:
2021-11-22 10:19:14 +01:00
parent 9e75c7e9b2
commit 2c74e268d3
5 changed files with 25 additions and 21 deletions

View File

@@ -76,8 +76,8 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
return false;
}
if ($subject instanceof AccompanyingCourseDocument) {
if (AccompanyingPeriod::STEP_CLOSED === $subject->getCourse()->getStep()) {
if ($subject instanceof AccompanyingPeriod) {
if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) {
if (\in_array($attribute, [self::UPDATE, self::CREATE, self::DELETE])) {
return false;
}