ViewStoreContext

The view store context: the view engine's saved views, view preferences and the wording a tenant sets over the datasets it reads, ported from the 9.x view store. Commands and events are named view-store.<aggregate>.<Name>, routes start with /view-store/<aggregate>.

A view belongs to its tenant and its owner. The owner is the audience: a user for a personal view, SHARED_OWNER_ID for a shared one, SYSTEM_OWNER_ID (under SYSTEM_TENANT_ID only) for a stored system view. A caller acts as one of the reserved owners by naming it in Wow-Scope, as far as the service's caller resolver lets it.

Properties

Link copied to clipboard

The request header naming the calling application. The service does not copy it as the client sent it: its caller resolver authenticates the application (CoSec's: the app of the scope CoSec resolved for the request, behind the CoSec gateway the one the gateway decided the request in and forwarded), and the edge records it as the standard request fact app_id and the caller's attribute app, which the view store reads.

Link copied to clipboard
const val NAME: String
Link copied to clipboard

The reserved owner of shared views and shared preferences; the parentheses keep it apart from every user id.

Link copied to clipboard

The reserved owner of stored system views, which live under SYSTEM_TENANT_ID only.

Link copied to clipboard

The one tenant stored system views live under: CoSec's platform tenant, by value. It is not the default tenant (0) of a deployment without tenants.

Functions

Link copied to clipboard
fun isReserved(ownerId: String): Boolean

Whether ownerId is a reserved owner: one in parentheses, such as SHARED_OWNER_ID.