summaryrefslogtreecommitdiff
path: root/modules/node/tests
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-03-07 10:43:22 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-03-07 10:43:22 -0800
commit09ecc5ba834bda67d5208216e6e19d9eafdca933 (patch)
treeb6ace3de97b9d8dca3e57494cd851783006d120f /modules/node/tests
parentd947e9a1ea96965a7c3ccc675697c849bbcff72f (diff)
downloadbrdo-09ecc5ba834bda67d5208216e6e19d9eafdca933.tar.gz
brdo-09ecc5ba834bda67d5208216e6e19d9eafdca933.tar.bz2
Issue #681760 by agentrickard, Josh Waihi, Niklas Fiekas, catch, xjm, NaX, chx, pwolanin, garywiz: Fixed Try to improve performance and eliminate duplicates caused by node_access() table joins.
Diffstat (limited to 'modules/node/tests')
-rw-r--r--modules/node/tests/node_access_test.module10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/node/tests/node_access_test.module b/modules/node/tests/node_access_test.module
index f2eca2e42..813bf929b 100644
--- a/modules/node/tests/node_access_test.module
+++ b/modules/node/tests/node_access_test.module
@@ -15,7 +15,7 @@ function node_access_test_node_grants($account, $op) {
// First grant a grant to the author for own content.
$grants['node_access_test_author'] = array($account->uid);
if ($op == 'view' && user_access('node test view', $account)) {
- $grants['node_access_test'] = array(8888);
+ $grants['node_access_test'] = array(8888, 8889);
}
if ($op == 'view' && $account->uid == variable_get('node_test_node_access_all_uid', 0)) {
$grants['node_access_all'] = array(0);
@@ -38,6 +38,14 @@ function node_access_test_node_access_records($node) {
'grant_delete' => 0,
'priority' => 0,
);
+ $grants[] = array(
+ 'realm' => 'node_access_test',
+ 'gid' => 8889,
+ 'grant_view' => 1,
+ 'grant_update' => 0,
+ 'grant_delete' => 0,
+ 'priority' => 0,
+ );
// For the author realm, the GID is equivalent to a UID, which
// means there are many many groups of just 1 user.
$grants[] = array(