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

Function checkDocumentAccess

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

Source from the content-addressed store, hash-verified

272 * Check if a user has read access to a document within a knowledge base.
273 */
274export async function checkDocumentAccess(
275 knowledgeBaseId: string,
276 documentId: string,
277 userId: string
278): Promise<DocumentAccessCheck> {
279 return resolveDocumentAccess(knowledgeBaseId, documentId, userId, false)
280}
281
282/**
283 * Check if a user has write access to a specific document.

Callers 4

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

Calls 1

resolveDocumentAccessFunction · 0.85

Tested by

no test coverage detected