fix(tickets): scope writes to tenant and validate FK references #209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/pms-193-scope-tickets-writes-validate-fk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
add_note UPDATEd tickets filtered only by id, so a cross-tenant ticket_id corrupted another tenant's updated_at/first_response_at/SLA columns; both UPDATEs are now scoped by tenant_id and the ticket is FK-validated before the note INSERT.
create_ticket now FK-validates type_id/category_id, update_ticket now FK-validates priority_id/queue_id, and assign_ticket now validates assigned_to_id belongs to the tenant, so a request body cannot link a ticket to another tenant's row.
#PMS-193