diff --git a/packages/db/src/repository/board.repo.ts b/packages/db/src/repository/board.repo.ts index 1bdb8338..7df836f2 100644 --- a/packages/db/src/repository/board.repo.ts +++ b/packages/db/src/repository/board.repo.ts @@ -287,7 +287,11 @@ export const getBySlug = async ( orderBy: [asc(lists.index)], }, }, - where: and(eq(boards.slug, boardSlug), isNull(boards.deletedAt)), + where: and( + eq(boards.slug, boardSlug), + isNull(boards.deletedAt), + eq(boards.visibility, "public"), + ), }); if (!board) return null; diff --git a/packages/db/src/repository/workspace.repo.ts b/packages/db/src/repository/workspace.repo.ts index bb7eb888..6c3e66b7 100644 --- a/packages/db/src/repository/workspace.repo.ts +++ b/packages/db/src/repository/workspace.repo.ts @@ -145,7 +145,7 @@ export const getBySlugWithBoards = (db: dbClient, workspaceSlug: string) => { slug: true, name: true, }, - where: isNull(boards.deletedAt), + where: and(isNull(boards.deletedAt), eq(boards.visibility, "public")), }, }, where: and(