You are here

function hook_node_access_acknowledge in Devel 6

Same name and namespace in other branches
  1. 7 devel_node_access.api.php \hook_node_access_acknowledge()

Acknowledge ownership of 'alien' grant records.

Some node access modules store grant records directly into the {node_access} table rather than returning them through hook_node_access_records(). This practice is not recommended and DNA will flag all such records as 'alien'.

If this is unavoidable, a module can confess to being the owner of these grant records, so that DNA can properly attribute them.

See also

hook_node_access_records()

File

./devel_node_access.api.php, line 70
Hook provided by the Devel Node Access module.

Code

function hook_node_access_acknowledge($grant) {
  if ($grant['realm'] == 'mymodule_all' && $grant['nid'] == 0) {
    return TRUE;
  }
}