Fixed: [create person] handle case when the user has two differents groups in the same center

Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/72
This commit is contained in:
2023-04-11 10:16:09 +02:00
parent 9853845c9c
commit ef13833966
3 changed files with 22 additions and 21 deletions

View File

@@ -21,12 +21,12 @@ interface AuthorizationHelperInterface
* Get reachable Centers for the given user, role,
* and optionnaly Scope.
*
* @return Center[]
* @return list<Center>
*/
public function getReachableCenters(UserInterface $user, string $role, ?Scope $scope = null): array;
/**
* @param array|Center|Center[] $center
* @param Center|list<Center> $center
*/
public function getReachableScopes(UserInterface $user, string $role, $center): array;
public function getReachableScopes(UserInterface $user, string $role, Center|array $center): array;
}