indexedOwnerCheck
indexedOwnerCheck<
S,F>(props):AccessCheck<S>
Defined in: packages/core/src/access/buildChecks.ts:122
Builds a read check narrowed to rows the requesting user owns, pushed into the owner field’s index.
The comparison value is built per request from user, and its shape follows the
field’s declared type: a relationship column stores Id[], so the value is
[user._id]; anything else compares the id directly. That decision needs the
resource config, which is why this is a distinct builder rather than a call to
indexedEqCheck.
Type Parameters
Section titled “Type Parameters”S extends string
Resource slug, inferred from props.resource.
F extends string
Owner field, constrained to S’s index-leading fields.
Parameters
Section titled “Parameters”Input props.
F
The owner field, e.g. "authorId".
resource
Section titled “resource”The resource this check governs.
Returns
Section titled “Returns”AccessCheck<S>
A check assignable to permissions[role][S].read.