diff --git a/node_reference/node_reference.module b/node_reference/node_reference.module index e726833d6ff6bc69ee0584f11ac924bbe287f7cc..6480f6cf52e3231fc46ff51e9fcbe43ed55f5c95 100644 --- a/node_reference/node_reference.module +++ b/node_reference/node_reference.module @@ -234,9 +234,10 @@ function node_reference_field_prepare_view($entity_type, $entities, $field, $ins ->condition('n.nid', $ids_to_check, 'IN'); // Unless the user has the right permissions, restrict on the node status. - // (note: the 'view any unpublished content' permission is provided by the - // 'view_unpublished' contrib module.) - if (!user_access('bypass node access') && !user_access('view any unpublished content')) { + // 'view_unpublished' contrib module and the + // 'view all unpublished content' + // permission is provided by the 'workbench_moderation' contrib module.) + if (!user_access('bypass node access') && !user_access('view any unpublished content') && !user_access('view all unpublished content')) { // ... AND n.status = 1. $status_condition = db_or() ->condition('n.status', NODE_PUBLISHED);