- π©πͺGermany Anybody Porta Westfalica
We're having the same issues in π Need to implement hook_query_TAG_alter per parent entity type to work with views correctly? Postponed and π Need to implement hook_query_TAG_alter per parent entity type to work with views correctly? Postponed
And I think any access module (except handling nodes, which uses grants) has this issue!
I think β¨ Add an entity query access API and deprecate hook_query_ENTITY_TYPE_access_alter() Needs work needs to be solved and what we'd all expect is that hook_entity_access() "simply" also works for views, at least with an opt-in. For nodes this can be implemented as suggested, but that doesn't help for all other entity types!
- π©πͺGermany Anybody Porta Westfalica
Eventually this may help in the meantime, also for non-node entities: Please help testing that fix and use with care: https://www.drupal.org/project/views_entity_access_check β
Happy to see some feedback!