mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
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:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user