function node_test_node_grants
Same name in other branches
- 7.x modules/node/tests/node_test.module \node_test_node_grants()
- 8.9.x core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants()
- 10 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants()
- 11.x core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants()
Implements hook_node_grants().
1 call to node_test_node_grants()
- NodeAccessRecordsTest::testNodeAccessRecords in core/
modules/ node/ tests/ src/ Kernel/ NodeAccessRecordsTest.php - Creates a node and tests the creation of node access rules.
File
-
core/
modules/ node/ tests/ modules/ node_test/ node_test.module, line 58
Code
function node_test_node_grants(AccountInterface $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().
return [
'test_article_realm' => [
1,
],
'test_page_realm' => [
1,
],
'test_alter_realm' => [
2,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.