mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
New permission for duplicate & export duplicate persons
Signed-off-by: Mathieu Jaumotte <mathieu.jaumotte@champs-libres.coop>
This commit is contained in:
@@ -38,19 +38,16 @@ class SimilarPersonMatcher
|
||||
CONST SIMILAR_SEARCH_ORDER_BY_SIMILARITY = 'similarity';
|
||||
|
||||
/**
|
||||
*
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
protected $em;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var AuthorizationHelper
|
||||
*/
|
||||
protected $authorizationHelper;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var TokenStorageInterface
|
||||
*/
|
||||
protected $tokenStorage;
|
||||
@@ -65,7 +62,6 @@ class SimilarPersonMatcher
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
}
|
||||
|
||||
|
||||
public function matchPerson(Person $person, $precision = 0.15, $orderBy = self::SIMILAR_SEARCH_ORDER_BY_SIMILARITY)
|
||||
{
|
||||
$centers = $this->authorizationHelper->getReachableCenters(
|
||||
@@ -97,7 +93,6 @@ class SimilarPersonMatcher
|
||||
$dql .= ' ORDER BY SIMILARITY(p.fullnameCanonical, UNACCENT(LOWER(:fullName))) DESC ';
|
||||
}
|
||||
|
||||
|
||||
$query = $this->em
|
||||
->createQuery($dql)
|
||||
->setParameter('fullName', $person->getFirstName() . ' ' . $person->getLastName())
|
||||
|
Reference in New Issue
Block a user