mirror of
https://github.com/itflow-org/itflow
synced 2026-12-03 09:39:02 +00:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user