MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / tryCanWrite

Function tryCanWrite

react/src/hooks.ts:481–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

479 }
480 setMsg('Checking write rights...');
481 async function tryCanWrite() {
482 const [canWriteAsync, msg] = await resource.canWrite(store, agent);
483 setCanWrite(canWriteAsync);
484 if (canWriteAsync) {
485 setMsg(null);
486 } else {
487 setMsg(
488 "You don't have write rights in this resource or its parents: " + msg,
489 );
490 }
491 }
492 tryCanWrite();
493 }, [resource, agent, agentStore?.subject]);
494

Callers 1

useCanWriteFunction · 0.85

Calls 1

canWriteMethod · 0.80

Tested by

no test coverage detected