From 875bea2bcab8e6bd8dccbbc4b933f62e5f4afa2d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 28 Aug 2023 02:22:05 +0200 Subject: [PATCH] Don't show local only notes to guest users, resolves #147 --- packages/backend/src/server/api/common/getters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/common/getters.ts b/packages/backend/src/server/api/common/getters.ts index fd7580775..cfcb86d82 100644 --- a/packages/backend/src/server/api/common/getters.ts +++ b/packages/backend/src/server/api/common/getters.ts @@ -19,7 +19,7 @@ export async function getNote( const note = await query.getOne(); - if (note == null) { + if (note == null || (me == null && note.localOnly)) { throw new IdentifiableError( "9725d0ce-ba28-4dde-95a7-2cbb2c15de24", "No such note.",