You are here

function hook_nodeaccess_grant_alter in Nodeaccess 7

Allow for changes to be made on the single grant item prior to saving.

Parameters

array &$grant: array( 'gid' => (int) gid for realm, 'realm' => (string) what realm the access grant belongs to (ex: nodeaccess_rid). 'grant_view' => (int) view access being granted, 'grant_update' => (int) update access being granted, 'grant_delete' => (int) delete access being granted, )

$node: Node object the grant is being applied to.

1 invocation of hook_nodeaccess_grant_alter()
nodeaccess_set_grants in ./nodeaccess.module
Set all grants for a node to nodeaccess table and acquire them.

File

./nodeaccess.api.php, line 48
API documentation for Nodeaccess module.

Code

function hook_nodeaccess_grant_alter(&$grant, $node) {

  // Make some change to the individual grant.
}