fix unauthed user case

This commit is contained in:
bkellam 2025-09-20 16:43:48 -07:00
parent 8a51fe7d23
commit a386364473

View file

@ -32,14 +32,16 @@ export const userScopedPrismaClientExtension = (userId?: string) => {
args.where = { args.where = {
...args.where, ...args.where,
OR: [ OR: [
// Only include repos that are permitted to the user, // Only include repos that are permitted to the user
{ ...(userId ? [
permittedUsers: { {
some: { permittedUsers: {
userId, some: {
userId,
}
} }
} },
}, ] : []),
// or are public. // or are public.
{ {
isPublic: true, isPublic: true,