Attachment downloads now enforce real access control SECURITY
The file-serving endpoint checked only that a request came from a logged-in user, not whether that user had any right to the ticket, project, or KB article a file actually belonged to — anyone who knew or guessed a stored filename could pull it down. Every download now looks up its parent record first and applies that record's own access rule: ticket attachments check requester ownership for Viewers, project attachments block Viewers outright, KB attachments require Tech role or higher across the board.