Merge branch 'issue416_chill_document_edit_button' into 'master'

Issue416 chill document edit button

See merge request Chill-Projet/chill-bundles!326
This commit is contained in:
2022-02-11 16:21:15 +00:00
18 changed files with 257 additions and 59 deletions

View File

@@ -58,6 +58,11 @@ class AccompanyingPeriodWorkVoter extends Voter
case self::SEE:
return $this->security->isGranted(AccompanyingPeriodVoter::SEE_DETAILS, $subject->getAccompanyingPeriod());
case self::CREATE:
case self::UPDATE:
return $this->security->isGranted(AccompanyingPeriodVoter::EDIT, $subject->getAccompanyingPeriod());
default:
throw new UnexpectedValueException("attribute {$attribute} is not supported");
}
@@ -82,6 +87,6 @@ class AccompanyingPeriodWorkVoter extends Voter
private function getRoles(): array
{
return [self::SEE];
return [self::SEE, self::CREATE, self::UPDATE];
}
}