I am using View access per node to hide certain nodes from the general public and allow specific roles to view it, which is simple and works like a charm.
The issue is that those nodes are shown, even when browsing with anonymous user. I can't find a way for the view to identify the "View access per node" status for each row.
I thought to change my approach; I was looking through the Comparison and Overview of Access Control modules, but any non-deprecated option available in Drupal 8 seems an overkill for this case.
hook_node_access_records
along withhook_node_grants
instead. You could do comment #3 as a workaround. – No Sssweat Nov 5 '20 at 8:26hook_node_access()
for a page listing entities. That's a general behavior you will find in Drupal core. – kiamlaluno♦ Nov 5 '20 at 8:37