I have a large index of items, and would like to add an access control mechanism for items on properties of individual users. Until now I had this implemented as filters in preprocessSearchQuery(), which was working all right with Version 7.x-1.x
Now I migrated to 7.x-2.x and the filters are not working any more. They just do not get processed.
class SearchApiGroupAccess extends SearchApiAbstractProcessor {
public function preprocessSearchQuery(SearchApiQuery $query) {
$filter = $query->getFilter();
$groupFilter = $query->createFilter('OR');
$publicGroupsFilter = $query->createFilter('AND');
$publicGroupsFilter->condition('visibility', 'c');
$publicGroupsFilter->condition('privacy', 'o');
$groupFilter->filter($publicGroupsFilter);
//more filters are added ...
$filter->filter($groupFilter);
}
}
How would you solve such a scenario in the new version?
I have a large index of items, and would like to add an access control mechanism for items on properties of individual users. Until now I had this implemented as filters in preprocessSearchQuery(), which was working all right with Version 7.x-1.x Now I migrated to 7.x-2.x and the filters are not working any more. They just do not get processed.
How would you solve such a scenario in the new version?
Thank you!