Skip to main content

DomainAccess

Defined in: js-api/src/domains.ts:229

Effective access of the CURRENT user on one domain table (see DomainTableClient.access). Composed by the SERVER (GET /domains/{schema}/{table}/access) from the same predicates its reads and writes apply: grants on the FINAL securing entity through the master delegate chain, column security, and relation travel.

can holds 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 rides the rows of a withAccess query (DOMAIN_ACCESS_COLUMNS). 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 every write flag false and every field readonly for everyone, admins included.

Properties

PropertyTypeDescriptionDefined in
auditbooleanWhether writes leave an in-transaction audit trail.js-api/src/domains.ts:265
canobject-js-api/src/domains.ts:230
can.deletebooleanDelete grant on the securing entity, under the same reaches-rows rule as edit; same false-negative shape.js-api/src/domains.ts:245
can.editbooleaninsert AND at least one column is editable 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.js-api/src/domains.ts:242
can.insertbooleanEdit grant on the securing entity — the server's insert predicate — 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:237
can.shareboolean-js-api/src/domains.ts:246
can.viewbooleanView grant on the securing entity. Row-mode tables may still expose individually granted rows when false.js-api/src/domains.ts:233
fieldsobjectEvery column the caller may see (declared and system columns alike), keyed by name; editable iff the caller may write it (Edit on an owning property schema). A restricted column is ABSENT. An autoNumber column reads readonly although the server still accepts a supplied value (imports keep their numbers) — a form never sends one.js-api/src/domains.ts:256
hasBusinessKeyboolean-js-api/src/domains.ts:266
securingTablestringThe 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:262
securityMode"table" | "row" | "master"-js-api/src/domains.ts:263
supportDomainSupportWhat the TABLE can do, independent of this caller — computed once on the server from the registration, so a client never guesses an affordance from the table's shape.js-api/src/domains.ts:269
travelableRelationsstring[]Relations the caller may expand (View on both the junction and the target table), in declaration order.js-api/src/domains.ts:259