Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions modules/custom_lists/custom_lists.module
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ function custom_lists_content_nodes($list, $items, $full_load = TRUE) {
$query->join('taxonomy_index', 'ti', 'ti.nid = n.nid');
$query->condition('ti.tid', $list['taxonomy']);
}
if (user_access('bypass node access') || user_access('administer nodes')) {
/*
* Custom lists should show only content assigned to the current domain.
* For regular users this is fixed by domain access itself.
* Administrators see content from all domains because domain access does not enforce node viewing restrictions.
* Gemeente Zwolle asked this to be fixed for administrators as well, so domain needs to be enforced in the query.
*/
global $_domain;
$domain_id = $_domain['domain_id'];
$query->innerJoin('domain_access', 'd', 'n.nid = d.nid');
$query->condition('d.gid', $domain_id, '=');
}

// Custom filters for certain use cases.
if (!empty($list['extra-filters']) && $list['extra-filters'] != '_none') {
Expand Down