PERMISSION_SCOPES
constPERMISSION_SCOPES:object
Defined in: packages/core/src/access/constants.ts:72
How hasPermission answers a quantified question: when no data is
supplied and a role’s check is a callback that needs the document, the scope
decides what “yes” would even mean.
doc— “may they do this to THIS document?”datais required; a callback that needs it and does not get it throws VexAccessError. Opt into this in edit views and row actions, where a silentfalsewould surface as a permanently disabled control and read like a misconfigured matrix.any— “may they do this to AT LEAST ONE document?” Resolves such a callback totruewithout invoking it. Use for nav/sidebar/list gating; per-document filtering still happens downstream infind/get.all(default) — “may they do this to EVERY document?” Resolves such a callback tofalse: a per-document condition cannot hold for all of them. Fail-closed, so omittingscopenever throws and never over-permits.
Static boolean checks are unaffected by scope, and any scope evaluates the
callback normally once data is supplied.
Type Declaration
Section titled “Type Declaration”
readonlyall:"all"="all"
readonlyany:"any"="any"
readonlydoc:"doc"="doc"