Most apps I've worked on move to soft delete at some point. A deleted_at column goes on the table, the default scope hides those rows, and a sprint later someone adds a Trash page with a restore button. That last step is where I keep finding authorization gaps.
The first one is the tenant filter. The normal read path goes through a scope that filters by tenant and hides deleted rows. The trash page needs the deleted rows, so someone reaches for Document.unscoped (or whatever your ORM calls it). In Rails, unscoped drops every default scope, so if the tenant filter lived in the same default_scope as deleted_at IS NULL , it's gone too. The trash list now shows deleted documents from every tenant, and nobody notices because in dev there's only one.
The second one is restore. It usually gets a role check like "editors can restore", which says nothing about whether this editor could ever see this document.…