Per-space shared trash in the unified Deleted files view #97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/space-trash"
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?
Closes #95
Per Nikola's spec: deleting inside a shared space no longer buries the file in the deleter's personal trash — it routes to the space's own trash (
/spaces/<name>/.trash/), and the existing single "Deleted files" view shows the union: personal deletions plus the trash of every space the caller's groups grant, newest first, each entry tagged with its origin and who deleted it.Why inside the space: everything composes. Scope authorizes members (read-only included) to see it; the group key (#18) keeps encrypting it — space-file deletion becomes a same-scope rename, removing v0.3.25's re-key-to-deleter behaviour; retention, legal holds, and audit apply unchanged since paths never leave the space; admin raw-deletes inside a space trash hit the same
retentionBlockedguard (test-pinned).Authorization (decided 2026-08-03): every member sees a space's entries; restore/purge require write membership (member of the group itself, not
-ro) — a read-only auditor cannot resurrect files, and their attempts get an indistinguishable not-found. Space entry IDs are namespaceds:<space>:<id>, so the existing/api/v1/trash/{id}surface addresses both kinds with no new routes.Sweeper (#77): auto-purge now also sweeps every space trash with identical guard rails, crediting
space:<name>in the audit trail.UI: origin chip (space name + deleter) on space entries; restore/purge buttons hidden when
canModifyis false. Deleting whole space roots keeps the old per-user semantics;.trashentries are now filtered from all non-admin listings server-side (previously root-only).Tests: routing + visibility matrix (write member / read-only / outsider), read-only restore/purge refusal, restore roundtrip, personal-trash unchanged, sweep of space trashes, and the retention suite adapted to the new routing.