auth/cell_field_actions.ts

Cell-field RPC handlers.

Three request_response actions bound to the specs in auth/cell_field_action_specs.ts:

  • cell_field_set — admin / owner / editor-grant on source may set; target must be view-admitted (so a caller can't link to a cell they couldn't otherwise see). Idempotent UPSERT on (source_id, name).
  • cell_field_delete — admin / owner / editor-grant on source. Idempotent: deleted: false when no row matched.
  • cell_field_list — bidirectional. Forward (pass source_id) is gated on can_view_cell(source) and filters targets to those the caller may view (strict target-visibility, batched). Reverse (pass target_id) has 2-layer authz: gate on can_view_cell(target) first, then filter rows by can_view_cell(source).

IDOR-mask 404s on cell-miss / cell-unviewable, mirroring the existence- leak guards in auth/cell_actions.ts / auth/cell_grant_actions.ts.

Audit events cell_field_set / cell_field_delete carry IDs only — see auth/cell_field_audit_metadata.ts.

view source

Declarations
#

3 declarations

CellFieldActionDeps
#

auth/cell_field_actions.ts view source

ActionFactoryDeps import type {CellFieldActionDeps} from '@fuzdev/fuz_app/auth/cell_field_actions.js';

log

Structured logger instance.

type Logger

audit

Bound audit emitter for fire-and-forget audit writes.

type AuditEmitter

create_cell_field_actions
#

to_field_json
#

auth/cell_field_actions.ts view source

(row: CellFieldRow): { source_id: string & $brand<"Uuid">; name: string; target_id: string & $brand<"Uuid">; created_at: string; } import {to_field_json} from '@fuzdev/fuz_app/auth/cell_field_actions.js';

row

returns

{ source_id: string & $brand<"Uuid">; name: string; target_id: string & $brand<"Uuid">; created_at: string; }

Depends on
#

Imported by
#