TinyBase logoTinyBase β

ClientAccess

The ClientAccess type describes how a client may use a path on a WsServer, as decided by the Authorize function when the client joins that path.

{
  readOnly?: boolean;
  context?: {[key: string]: any};
}
TypeDescription
readOnly?boolean

The readOnly property, when true, prevents the client from writing anything to the path. Changes it sends are not merged into the path's MergeableStore, nor relayed to other clients.

context?{[key: string]: any}

The context property is any information about the client that the CanWriteCell and CanWriteValue functions will need, such as the Id of the authenticated user.

A client with ClientAccess can read everything on the path. Unless it is read-only, it can also write whatever the CanWriteCell and CanWriteValue functions allow.

Since

v10.1.0