fixed: voter and permissions in accompanying course document

This commit is contained in:
2022-07-11 12:55:02 +02:00
parent 3bb8b713d1
commit ab08dab88a
5 changed files with 36 additions and 33 deletions

View File

@@ -106,6 +106,10 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
) {
return false;
}
if (self::CREATE === $attribute && null !== $subject->getCourse()) {
return $this->voterHelper->voteOnAttribute($attribute, $subject->getCourse(), $token);
}
}
return $this->voterHelper->voteOnAttribute($attribute, $subject, $token);