I am trying to do this without
hook_node_grants because, for some reason, it messes with the nodes that are being controlled by the 'Group' module. The Group module itself used to use Node grants, but they got rid of all of its implementations back in July of this year.
For my use case, in addition to grouped nodes, I need private nodes that can allow for access based on field values. And right now to achieve this I am using
hook_node_access in a custom module.
The issue with this is that it doesn't work for all the other things, like views and I do not know how many others there are. So, this I'd like to know:
Is there a way to do the access checks once and have them enforced everywhere? ( is hook_access_query_alter the way to do it)?
If there isn't a unified way to go about it? How many access checks should be implemented for a secure approach?