2 * Implements hook_node_access_records().
4 function {{ machine_name }}_node_access_records($node) {
5 // We only care about the node if it has been marked private. If not, it is
6 // treated just like any other node and we completely ignore it.
9 // Only published nodes should be viewable to all users. If we allow access
10 // blindly here, then all users could view an unpublished node.
21 // For the example_author array, the GID is equivalent to a UID, which
22 // means there are many groups of just 1 user.
23 // Note that an author can always view his or her nodes, even if they
24 // have status unpublished.
26 'realm' => 'example_author',