mirror of
https://github.com/itflow-org/itflow
synced 2026-07-26 18:27:14 +00:00
Fix Client Permission overides to include deny allow list in projects prohect and edit ticket
This commit is contained in:
@@ -7,7 +7,10 @@ enforceUserPermission('module_support', 2);
|
||||
// Ticket client access overide - This is the only way to show tickets without a client to 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)";
|
||||
$access_permission_query_overide .= " AND ticket_client_id IN (0,$client_access_string)";
|
||||
}
|
||||
if ($client_deny_string) {
|
||||
$access_permission_query_overide .= " AND ticket_client_id NOT IN ($client_deny_string)";
|
||||
}
|
||||
|
||||
$ticket_id = intval($_GET['id']);
|
||||
|
||||
@@ -21,8 +21,11 @@ if (isset($_GET['client_id'])) {
|
||||
enforceUserPermission('module_support');
|
||||
$project_permission_snippet = '';
|
||||
|
||||
if (!empty($client_access_string)) {
|
||||
$project_permission_snippet = "AND project_client_id IN ($client_access_string) OR project_client_id = 0";
|
||||
if ($client_access_string) {
|
||||
$project_permission_snippet .= " AND (project_client_id IN ($client_access_string) OR project_client_id = 0)";
|
||||
}
|
||||
if ($client_deny_string) {
|
||||
$project_permission_snippet .= " AND project_client_id NOT IN ($client_deny_string)";
|
||||
}
|
||||
|
||||
if (isset($_GET['project_id'])) {
|
||||
|
||||
@@ -17,9 +17,14 @@ if (isset($_GET['client_id'])) {
|
||||
|
||||
// Perms & Project client access snippet
|
||||
enforceUserPermission('module_support');
|
||||
|
||||
$project_permission_snippet = '';
|
||||
if (!empty($client_access_string)) {
|
||||
$project_permission_snippet = "AND project_client_id IN ($client_access_string) OR project_client_id = 0";
|
||||
|
||||
if ($client_access_string) {
|
||||
$project_permission_snippet .= " AND (project_client_id IN ($client_access_string) OR project_client_id = 0)";
|
||||
}
|
||||
if ($client_deny_string) {
|
||||
$project_permission_snippet .= " AND project_client_id NOT IN ($client_deny_string)";
|
||||
}
|
||||
|
||||
// Project Completed Status Query
|
||||
|
||||
Reference in New Issue
Block a user