function workflow_access_node_grants in Workflow 5
Same name and namespace in other branches
- 8 modules/workflow_access/workflow_access.module \workflow_access_node_grants()
- 5.2 workflow_access.module \workflow_access_node_grants()
- 6.2 workflow_access/workflow_access.module \workflow_access_node_grants()
- 6 workflow_access/workflow_access.module \workflow_access_node_grants()
- 7.2 workflow_access/workflow_access.module \workflow_access_node_grants()
- 7 workflow_access/workflow_access.module \workflow_access_node_grants()
Implementation of hook_node_grants().
Supply the workflow access grants. We are simply using roles as access lists, so rids translate directly to gids.
File
- ./
workflow_access.module, line 45 - Provides node access permissions based on workflow states.
Code
function workflow_access_node_grants($account, $op) {
return array(
'workflow_access' => array_keys($account->roles),
'workflow_access_owner' => array(
$account->uid,
),
);
}