MCPcopy Index your code
hub / github.com/simstudioai/sim / checkChunkAccess

Function checkChunkAccess

apps/sim/app/api/knowledge/utils.ts:365–372  ·  view source on GitHub ↗
(
  knowledgeBaseId: string,
  documentId: string,
  chunkId: string,
  userId: string
)

Source from the content-addressed store, hash-verified

363 * Check if a user has read access to a chunk within a document and knowledge base.
364 */
365export async function checkChunkAccess(
366 knowledgeBaseId: string,
367 documentId: string,
368 chunkId: string,
369 userId: string
370): Promise<ChunkAccessCheck> {
371 return resolveChunkAccess(knowledgeBaseId, documentId, chunkId, userId, false)
372}
373
374/**
375 * Check if a user has write access to a chunk.

Callers 2

utils.test.tsFile · 0.90
route.tsFile · 0.90

Calls 1

resolveChunkAccessFunction · 0.85

Tested by

no test coverage detected