Refactor PersonSearch and create PersonACLAwareRepository

The search api delegates the query to a person acl aware "repository"
(although this does not implements ObjectRepository interface).
This commit is contained in:
2021-09-10 17:44:01 +02:00
parent f87f03b5c0
commit 6bc83edfe9
10 changed files with 497 additions and 416 deletions

View File

@@ -1,6 +1,11 @@
services:
# note: the services.yaml file define some autoloading
chill.person.repository.person:
class: Chill\PersonBundle\Repository\PersonRepository
autowire: true
autoconfigure: true
Chill\PersonBundle\Repository\PersonRepository: '@chill.person.repository.person'
Chill\PersonBundle\Repository\PersonACLAwareRepositoryInterface: '@Chill\PersonBundle\Repository\PersonACLAwareRepository'

View File

@@ -1,25 +1,11 @@
services:
chill.person.search_person:
class: Chill\PersonBundle\Search\PersonSearch
arguments:
- "@doctrine.orm.entity_manager"
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- "@chill_main.paginator_factory"
calls:
- ['setContainer', ["@service_container"]]
Chill\PersonBundle\Search\PersonSearch:
autowire: true
tags:
- { name: chill.search, alias: 'person_regular' }
Chill\PersonBundle\Search\SimilarityPersonSearch:
arguments:
- "@doctrine.orm.entity_manager"
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- "@chill_main.paginator_factory"
- '@chill.person.search_person'
calls:
- ['setContainer', ["@service_container"]]
autowire: true
tags:
- { name: chill.search, alias: 'person_similarity' }