fix error on creating an accompanying period work

This commit is contained in:
Julien Fastré 2022-02-11 17:09:56 +01:00
parent 0fa119c984
commit b859283766

View File

@ -66,6 +66,9 @@ class AccompanyingPeriodWorkVoter extends Voter
case self::SEE: case self::SEE:
return $this->security->isGranted(AccompanyingPeriodVoter::SEE_DETAILS, $subject); return $this->security->isGranted(AccompanyingPeriodVoter::SEE_DETAILS, $subject);
case self::CREATE:
return $this->security->isGranted(AccompanyingPeriodVoter::CREATE, $subject);
default: default:
throw new UnexpectedValueException(sprintf( throw new UnexpectedValueException(sprintf(
"attribute {$attribute} is not supported on instance %s", "attribute {$attribute} is not supported on instance %s",