I have removed "Access Content " Permission from Anonymous user. Now want to display specific node to the anonymous user.
As this is for only 1 or 2 nodes, It's not a good idea to use a contributed module like https://www.drupal.org/project/access_by_entity. I am looking for a solution as a custom code only
I have tried mymodule_node_access also but it's not working.