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

@@ -2871,12 +2871,8 @@ if (isset($_POST['export_tickets'])) {
$ticket_project_snippet = '';
}
// Client access override - the only way tickets without a client reach agents
// with restricted client access
$access_permission_query_overide = '';
if ($client_access_string) {
$access_permission_query_overide = "AND ticket_client_id IN (0,$client_access_string)";
}
// Tickets with no client stay visible to restricted agents - clientScopeSql() includes 0
$access_permission_query_overide = clientScopeSql('ticket_client_id');
// Date Filter
$dtf = escapeSql(!empty($_POST['dtf']) ? $_POST['dtf'] : '1970-01-01');