clientScopeSql sweep whicn now removed the extra unessesary client joins

This commit is contained in:
johnnyq
2026-08-06 11:45:56 -04:00
parent 83383599a1
commit ddd9c2b56a
79 changed files with 139 additions and 174 deletions

View File

@@ -84,8 +84,11 @@ function clientScopeSql($column) {
$sql = '';
// 0 is included deliberately: a record with no client isn't any client's data, so a
// restricted user keeps seeing it. This also matches the deny branch below, where 0
// already passes NOT IN, and the old hand-rolled ticket override that did IN (0,...).
if (!empty($client_access_array)) {
$sql .= " AND $column IN (" . implode(',', array_map('intval', $client_access_array)) . ")";
$sql .= " AND $column IN (0," . implode(',', array_map('intval', $client_access_array)) . ")";
}
if (!empty($client_deny_array)) {