diff --git a/src/Document/document.schema.ts b/src/Document/document.schema.ts index 6b311f5..9bf5d9e 100644 --- a/src/Document/document.schema.ts +++ b/src/Document/document.schema.ts @@ -402,7 +402,7 @@ export class DocumentSchema extends PothosSchema { if (!document.isPublic) { if ( document.ownerId !== ctx.websocket?.me?.id && - !document.collaborators.some((c) => c.userId === ctx.websocket?.me?.id && c.writable) + !document.collaborators.some((c) => c.userId === ctx.websocket?.me?.id && c.writable && c.readable) ) throw new Error('User is not owner or collaborator of document') }