From 35f009e92559b7d2c59fcbf68252ef6f57e21360 Mon Sep 17 00:00:00 2001 From: Wanjohi Date: Sun, 11 May 2025 01:02:28 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9C=20fix:=20Games=20should=20only=20b?= =?UTF-8?q?e=20visible=20to=20logged=20in=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/zero/schema.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/zero/schema.ts b/packages/zero/schema.ts index 2b4fee65..b5e9719b 100644 --- a/packages/zero/schema.ts +++ b/packages/zero/schema.ts @@ -354,25 +354,25 @@ export const permissions = definePermissions(schema, () => { ] } }, - //Games are publicly viewable + //Games are publicly viewable for logged in users games: { row: { - select: ANYONE_CAN + select: [(auth: Auth, q: ExpressionBuilder) => q.cmpLit(auth.sub, "IS NOT", null),] } }, base_games: { row: { - select: ANYONE_CAN + select: [(auth: Auth, q: ExpressionBuilder) => q.cmpLit(auth.sub, "IS NOT", null),] } }, categories: { row: { - select: ANYONE_CAN + select: [(auth: Auth, q: ExpressionBuilder) => q.cmpLit(auth.sub, "IS NOT", null),] } }, images: { row: { - select: ANYONE_CAN + select: [(auth: Auth, q: ExpressionBuilder) => q.cmpLit(auth.sub, "IS NOT", null),] } }, };