mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53: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:
@@ -65,6 +65,9 @@ class PersonDuplicateController extends Controller
|
||||
. " found on this server");
|
||||
}
|
||||
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_DUPLICATE', $person,
|
||||
"You are not allowed to see this person.");
|
||||
|
||||
$duplicatePersons = $this->similarPersonMatcher->
|
||||
matchPerson($person, 0.5, SimilarPersonMatcher::SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL);
|
||||
|
||||
@@ -82,6 +85,9 @@ class PersonDuplicateController extends Controller
|
||||
{
|
||||
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
|
||||
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_DUPLICATE', $person1,
|
||||
"You are not allowed to see this person.");
|
||||
|
||||
$form = $this->createForm(PersonConfimDuplicateType::class);
|
||||
|
||||
$form->handleRequest($request);
|
||||
@@ -118,6 +124,9 @@ class PersonDuplicateController extends Controller
|
||||
{
|
||||
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
|
||||
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_DUPLICATE', $person1,
|
||||
"You are not allowed to see this person.");
|
||||
|
||||
$personNotDuplicate = $this->getDoctrine()->getRepository(PersonNotDuplicate::class)
|
||||
->findOneBy(['person1' => $person1, 'person2' => $person2]);
|
||||
|
||||
@@ -138,6 +147,9 @@ class PersonDuplicateController extends Controller
|
||||
{
|
||||
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
|
||||
|
||||
$this->denyAccessUnlessGranted('CHILL_PERSON_DUPLICATE', $person1,
|
||||
"You are not allowed to see this person.");
|
||||
|
||||
$personNotDuplicate = $this->getDoctrine()->getRepository(PersonNotDuplicate::class)
|
||||
->findOneBy(['person1' => $person1, 'person2' => $person2]);
|
||||
|
||||
|
Reference in New Issue
Block a user