mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
voter fixes
This commit is contained in:
@@ -112,11 +112,13 @@ 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;
|
||||
}
|
||||
if ($subject instanceof AccompanyingPeriod) {
|
||||
if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) {
|
||||
if (\in_array($attribute, [self::UPDATE, self::CREATE_COURSE, self::DELETE])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user