Ticket CCs in the API: ticket_ccs read, create and delete endpoints scoped through the ticket's client, adding one address or several with an optional email to each new CC, removing by id or by address at Modify as on the ticket page, closed tickets left as they are, ticket history and audit lines; tickets/create takes ticket_ccs before its first email goes out and tickets/read returns each ticket's CCs; 26.12.3 changelog

This commit is contained in:
johnnyq
2026-11-30 14:12:08 -05:00
parent b8db50adfa
commit c98ea0e686
10 changed files with 280 additions and 3 deletions

View File

@@ -157,6 +157,7 @@ $resource_module = [
'files' => 'module_support',
'folders' => 'module_support',
'ticket_replies' => 'module_support',
'ticket_ccs' => 'module_support',
'technicians' => 'module_support',
'projects' => 'module_support',
'tasks' => 'module_support',
@@ -248,7 +249,13 @@ if (!isset($resource_module[$resource])) {
apiDeny("This API resource is not mapped to a permission module.");
}
$required_level = $operation_level[$operation_file] ?? 2;
// Where a resource's page asks less than its file's name says - a CC comes off a ticket as an edit of the
// ticket, at Modify, as the x beside them on its page does, not a delete at Full
$resource_operation_level = [
'ticket_ccs' => ['delete.php' => 2],
];
$required_level = $resource_operation_level[$resource][$operation_file] ?? $operation_level[$operation_file] ?? 2;
if ($resource_module[$resource] !== '' && lookupUserPermission($resource_module[$resource]) < $required_level) {
apiDeny(apiPermissionText($resource_module[$resource], $required_level));
}