Skip to content

document hook: Allow owners to view their trashed documents. - #88

Merged
santhoshh-kumar merged 1 commit into
mainfrom
fix/owner-trash-access
Aug 10, 2026
Merged

document hook: Allow owners to view their trashed documents.#88
santhoshh-kumar merged 1 commit into
mainfrom
fix/owner-trash-access

Conversation

@santhoshh-kumar

Copy link
Copy Markdown
Collaborator

Previously, opening a document in trash (from the trash panel) or having an open document trashed from another tab/device showed a spurious "Access to this document has been restricted" error with response code 404.

Realtime connections were still established for trashed documents, but the realtime server strictly rejects access checks for them (1008 close), and the close handler then treated the owner's own trashed document as a revocation.

This commit skips realtime connections for trashed documents, which are served as a read-only, REST-only trash view, and when an open document is moved to trash elsewhere, surfaces the read-only trash view instead of the restricted error. Regression tests cover both cases.

Previously, opening a document in trash (from the trash panel) or
having an open document trashed from another tab/device showed a
spurious "Access to this document has been restricted" error with
response code 404.

Realtime connections were still established for trashed
documents, but the realtime server strictly rejects access checks
for them (1008 close), and the close handler then treated the
owner's own trashed document as a revocation.

This commit skips realtime connections for trashed documents,
which are served as a read-only, REST-only trash view, and when an
open document is moved to trash elsewhere, surfaces the read-only
trash view instead of the restricted error. Regression tests cover
both cases.
@santhoshh-kumar
santhoshh-kumar merged commit ece8a03 into main Aug 10, 2026
3 checks passed
@santhoshh-kumar
santhoshh-kumar deleted the fix/owner-trash-access branch August 10, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant