Implements right "see confidential course" on method findByPerson

Add unit tests for that
This commit is contained in:
2023-07-04 15:59:39 +02:00
parent a7dbdc2b9d
commit dd344aed52
7 changed files with 306 additions and 49 deletions

View File

@@ -33,6 +33,9 @@ interface AccompanyingPeriodACLAwareRepositoryInterface
public function countByUserOpenedAccompanyingPeriod(?User $user): int;
/**
* @return array<AccompanyingPeriod>
*/
public function findByPerson(
Person $person,
string $role,
@@ -45,14 +48,19 @@ interface AccompanyingPeriodACLAwareRepositoryInterface
* @param array|UserJob[] $jobs if empty, does not take this argument into account
* @param array|Scope[] $services if empty, does not take this argument into account
*
* @return array|AccompanyingPeriod[]
* @return list<AccompanyingPeriod>
*/
public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, ?int $limit = null, ?int $offset = null): array;
/**
* @param array|PostalCode[] $postalCodes
* @return list<AccompanyingPeriod>
*/
public function findByUserAndPostalCodesOpenedAccompanyingPeriod(?User $user, array $postalCodes, array $orderBy = [], int $limit = 0, int $offset = 50): array;
/**
* @deprecated
* @return list<AccompanyingPeriod>
*/
public function findByUserOpenedAccompanyingPeriod(?User $user, array $orderBy = [], int $limit = 0, int $offset = 50): array;
}