codappix / search_core

TYPO3 CMS 8.x Extension with basic Integration of Elasticsearch
https://search-core.readthedocs.io/en/latest/
12 stars 9 forks source link

Relation resolving does not respect access rights #94

Open DanielSiepmann opened 6 years ago

DanielSiepmann commented 6 years ago

At the moment we resolve relations, while indexing, via TYPO3 API. We are using a BE API, which does only take Workspace and deleted into account, no enableFields like hidden.

Therefore relations are also resolved and available as facet in search, even if they are hidden.

Implementation is done in Codappix\SearchCore\Domain\Index\TcaIndexer\RelationResolver andCodappix\CdxCore\DataProcessing\TcaRelationResolvingProcessor.

Currently I don't have idea how to resolve relations other then by implementing each relation type ourself :( Perhaps we can reuse some code from Extbase, which should use models and TCA to build queries.

DanielSiepmann commented 6 years ago

One possible way might be to use getProcessedValue instead of getProcessedValueExtra and to provide the argument to return uids instead of strings.

We then can create custom queries with given uids. We have to check for mm, and build the query with restrictions. We can fetch the remote title field only and return that.

This might be 2 - 4 hours work.

DanielSiepmann commented 6 years ago

But as we have to re-implement Core logic, we might wait till TYPO3 CMS V9 is released, where https://typo3.org/community/teams/typo3-development/initiatives/persistence/ should provide this API.