function acl_node_test_node_grants in ACL 8
Same name and namespace in other branches
- 7 tests/acl_node_test.module \acl_node_test_node_grants()
Implements hook_node_grants().
File
- tests/
modules/ acl_node_test/ acl_node_test.module, line 22 - Dummy module implementing node related hooks to test API interaction with the Node module.
Code
function acl_node_test_node_grants($account, $op) {
// Give everyone full grants so we don't break other node tests.
// Our node access tests asserts three realms of access.
// See testGrantAlter().
$grants = array();
foreach (node_type_get_names() as $type) {
$grants['test_' . $type . '_realm'] = array(
1,
);
}
$grants['test_alter_realm'] = array(
2,
);
return $grants;
}