From 8da49651a15daa66a1c9289044f261ad934ae536 Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon <yahgrp@poplarware.com> Date: Wed, 16 Jan 2013 09:47:23 -0800 Subject: [PATCH] Issue #1885420 by kim.pepper, xjm: Document that node access queries on other tables need metadata --- core/modules/node/node.module | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/modules/node/node.module b/core/modules/node/node.module index d1d3eb9ea05f..3f2ce00e0553 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -2872,6 +2872,14 @@ function node_access_view_all_nodes($account = NULL) { * node access checks for the user account given by the 'account' meta-data (or * global $user if not provided), for an operation given by the 'op' meta-data * (or 'view' if not provided; other possible values are 'update' and 'delete'). + * + * Queries tagged with 'node_access' that are not against the {node} table + * must add the base table as metadata. For example: + * @code + * $query + * ->addTag('node_access') + * ->addMetaData('base_table', 'taxonomy_index'); + * @endcode */ function node_query_node_access_alter(AlterableInterface $query) { global $user; -- GitLab