stripDeniedFields
stripDeniedFields<
TDoc>(doc,resolved):TDoc
Defined in: packages/core/src/access/resolveFieldPermissions.ts:263
Shallow-copies doc and deletes every key the caller may not read. Used by
the read paths to shape responses; never mutates what Convex returned.
_id/_slug are always retained — stripping _id would break
populateDocs, admin row keys, and every update({ id }) round trip.
_creationTime is NOT exempted here (developer decision, binding,
“access-system-fields”) — it is a real gateable field-permission key for
reads now, stripped like any other field a resolved map denies.
Type Parameters
Section titled “Type Parameters”TDoc extends Record<string, unknown>
Parameters
Section titled “Parameters”TDoc
The document Convex returned.
resolved
Section titled “resolved”Result of resolveFieldPermissions.
Returns
Section titled “Returns”TDoc
doc itself (same reference) when nothing is restricted — no
allocation on the common path; otherwise a shallow copy minus denied keys.