mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
AccompanyingPeriodResource: add ACL
This commit is contained in:
@@ -23,6 +23,11 @@ class AccompanyingPeriodResourceVoter extends Voter
|
||||
|
||||
private AccessDecisionManagerInterface $accessDecisionManager;
|
||||
|
||||
public function __construct(AccessDecisionManagerInterface $accessDecisionManager)
|
||||
{
|
||||
$this->accessDecisionManager = $accessDecisionManager;
|
||||
}
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
return $subject instanceof Resource && self::EDIT === $attribute;
|
||||
@@ -35,7 +40,7 @@ class AccompanyingPeriodResourceVoter extends Voter
|
||||
case self::EDIT:
|
||||
return $this->accessDecisionManager->decide(
|
||||
$token,
|
||||
AccompanyingPeriodVoter::EDIT,
|
||||
[AccompanyingPeriodVoter::EDIT],
|
||||
$subject->getAccompanyingPeriod()
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user