function nodeaccess_node_grants in Nodeaccess 6
Same name and namespace in other branches
- 8.2 nodeaccess.module \nodeaccess_node_grants()
- 8 nodeaccess.module \nodeaccess_node_grants()
- 5 nodeaccess.module \nodeaccess_node_grants()
- 6.2 nodeaccess.module \nodeaccess_node_grants()
- 7 nodeaccess.module \nodeaccess_node_grants()
Implementation of hook_node_grants().
File
- ./
nodeaccess.module, line 644
Code
function nodeaccess_node_grants($account, $op) {
$roles = is_array($account->roles) ? array_keys($account->roles) : array(
-1,
);
return array(
'nodeaccess_rid' => $roles,
'nodeaccess_uid' => array(
$account->uid,
),
'nodeaccess_author' => array(
$account->uid,
),
);
}