function nodeaccess_node_grants in Nodeaccess 7
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()
- 6 nodeaccess.module \nodeaccess_node_grants()
Implements hook_node_grants().
@parap string $op
Parameters
Object $account:
Return value
array
File
- ./
nodeaccess.module, line 630 - Provide per node access control
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,
),
);
}