mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
action to create an accompanyinig period
This commit is contained in:
@@ -38,6 +38,9 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRole
|
||||
}
|
||||
|
||||
// TODO take scopes into account
|
||||
if (count($subject->getPersons()) === 0) {
|
||||
return true;
|
||||
}
|
||||
foreach ($subject->getPersons() as $person) {
|
||||
// give access as soon as on center is reachable
|
||||
if ($this->helper->userHasAccess($token->getUser(), $person->getCenter(), $attribute)) {
|
||||
|
Reference in New Issue
Block a user