ownerPredicateCheck
ownerPredicateCheck<
S,F>(props):AccessMutationCheck<S>
Defined in: packages/core/src/access/buildChecks.ts:159
Builds a single-document check that passes only when field names the requesting
user.
A per-document predicate rather than an index range: create/update/delete
authorize one document, so there is nothing to narrow (DD 14). field is therefore
any readable field, not only an indexed one.
Type Parameters
Section titled “Type Parameters”S extends string
Resource slug, inferred from props.resource.
F extends string
Owner field on S.
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”A check assignable to a non-query action on S.