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

Function checkDocumentWriteAccess

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

Source from the content-addressed store, hash-verified

284 * Write access is granted if user has write access to the knowledge base.
285 */
286export async function checkDocumentWriteAccess(
287 knowledgeBaseId: string,
288 documentId: string,
289 userId: string
290): Promise<DocumentAccessCheck> {
291 return resolveDocumentAccess(knowledgeBaseId, documentId, userId, true)
292}
293
294/**
295 * Resolve chunk access within a document/knowledge base, gated by read or write

Callers 4

executeFunction · 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