DomainTableCapabilities
Defined in: js-api/src/domains.ts:156
Effective capabilities of the CURRENT user on one domain table
(see DomainTableClient.capabilities). Composed by the SERVER
(GET /domains/{schema}/{table}/capabilities) from the same predicates its reads
and writes apply: grants on the FINAL securing entity through the master delegate
chain, the writable-column mirror of column security, and relation travel.
These are TABLE-level affordances, and they drift toward denial: every flag is
derived from grants on the securing entity, so grants that reach individual ROWS
(a master row of a master-mode table, a promoted row of a row-mode table) are not
counted. A false flag therefore means "no table-wide right" — the caller may still
succeed on a particular row, and per-row truth comes from
DomainRow.permissions. A true flag mirrors a predicate the server also
enforces, so gating UI on it avoids the common 403s (but never assume it removes
them: grants can change between the probe and the write, and column-level
restrictions are checked per value). Read-only registrations (platform tables
exposed through the Core schema) answer canInsert/canEdit/canDelete = false for
everyone, admins included.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
audit | boolean | Whether writes leave an in-transaction audit trail. | js-api/src/domains.ts:186 |
canDelete | boolean | Delete grant on the securing entity, under the same reaches-rows rule as canEdit; same false-negative shape. | js-api/src/domains.ts:173 |
canEdit | boolean | canInsert AND at least one column is writable for the caller (the built-in grid-editability rule) AND the table grant actually reaches rows — for non-table security modes that needs the securing table's rows to default to table visibility, otherwise access is per-row. Same false-negative shape as canInsert. | js-api/src/domains.ts:170 |
canInsert | boolean | Edit grant on the securing entity — the server's insert predicate (_checkInsertAllowed) — on a table that accepts writes. False negative on master-mode tables where the caller holds the grant on an individual MASTER ROW rather than the master table. | js-api/src/domains.ts:164 |
canShareTable | boolean | - | js-api/src/domains.ts:174 |
canView | boolean | View grant on the securing entity. Row-mode tables may still expose individually granted rows when false. | js-api/src/domains.ts:159 |
hasBusinessKey | boolean | - | js-api/src/domains.ts:187 |
securingTable | string | The FINAL securing table (<schema>.<table>) every grant above is evaluated on: the table itself, or the end of its master delegate chain. | js-api/src/domains.ts:183 |
securityMode | "table" | "master" | "row" | - | js-api/src/domains.ts:184 |
travelableRelations | string[] | Relations the caller may expand (View on both the junction and the target table), in declaration order. | js-api/src/domains.ts:180 |
writableColumns | string[] | Column names the caller may write (Edit on an owning property schema), in declared column order. | js-api/src/domains.ts:177 |