🐜 fix: Games should only be visible to logged in users

This commit is contained in:
Wanjohi
2025-05-11 01:02:28 +03:00
parent 5806dc6e86
commit 35f009e925

View File

@@ -354,25 +354,25 @@ export const permissions = definePermissions<Auth, Schema>(schema, () => {
] ]
} }
}, },
//Games are publicly viewable //Games are publicly viewable for logged in users
games: { games: {
row: { row: {
select: ANYONE_CAN select: [(auth: Auth, q: ExpressionBuilder<Schema, 'games'>) => q.cmpLit(auth.sub, "IS NOT", null),]
} }
}, },
base_games: { base_games: {
row: { row: {
select: ANYONE_CAN select: [(auth: Auth, q: ExpressionBuilder<Schema, 'base_games'>) => q.cmpLit(auth.sub, "IS NOT", null),]
} }
}, },
categories: { categories: {
row: { row: {
select: ANYONE_CAN select: [(auth: Auth, q: ExpressionBuilder<Schema, 'categories'>) => q.cmpLit(auth.sub, "IS NOT", null),]
} }
}, },
images: { images: {
row: { row: {
select: ANYONE_CAN select: [(auth: Auth, q: ExpressionBuilder<Schema, 'images'>) => q.cmpLit(auth.sub, "IS NOT", null),]
} }
}, },
}; };