diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.module b/core/modules/field/modules/field_sql_storage/field_sql_storage.module index 4eb762f..b43ba75 100644 --- a/core/modules/field/modules/field_sql_storage/field_sql_storage.module +++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.module @@ -515,7 +515,10 @@ function field_sql_storage_field_storage_query(EntityFieldQuery $query) { } else { $select_query = db_select($tablename, $table_alias); - if (!isset($select_query->tags['DANGEROUS_NODE_ACCESS_OPT_OUT'])) { + // Allow queries internal to the Field API to opt out of the access + // check, for situations where the query's results should not depend on + // the access grants for the current user. + if (!isset($query->tags['DANGEROUS_NODE_ACCESS_OPT_OUT'])) { $select_query->addTag('entity_field_access'); } $select_query->addMetaData('base_table', $tablename);