js-bao-wss-client / DocumentAccessResult
Interface: DocumentAccessResult
Result of documents.validateAccess(), describing whether a user can access the document and at what permission level — the current user by default, or the user named by { userId }.
Properties
accessSource?
optionalaccessSource?:"owner"|"link"|"grant"|"group"
How the access was obtained, present whenever hasAccess is true. The same vocabulary documents.get() reports.
appRole?
optionalappRole?:"owner"|"admin"|"member"
The SUBJECT's role in the app, present only when a userId was named.
Reported beside permission, never folded into it: the tag routes admit an admin or owner without a document grant, and content writes (documents.update(), block and blob writes) admit nobody without one. A caller gating a content write must decide on permission alone.
error?
optionalerror?:string
hasAccess
hasAccess:
boolean
permission?
optionalpermission?:"owner"|"read-write"|"reader"|"admin"
success
success:
boolean