Spike-1070: record-level access design for matters and clients

Story 1070Epic None1 files · +451/−0

PR #266 · pramaan-io/pramaan-functions · merged 2026-06-08

Why this matters

Right now, anyone in the firm can see every matter.

Record-level access, before the leak.

One missed call. One leaked matter.

The fix — Firm-scoped is not enough — rows must know who may read them.

How it flows

sequenceDiagram
  autonumber
  participant user as Request
  participant app as Application
  participant db as Database / RLS
  user->>app: read matters
  app->>app: appends user identity
  app->>db: query with identity
  db->>db: RLS policy filters rows
  db->>app: only allowed rows
  app->>user: safe result

What changed, file by file

Spike design for record-level RLS on matters and clients: behavior audit, RLS design, cross-repo impact, and ticket plan.

New fields: Status : Proposed

Files changed (1)

File±
docs/notes/record-level-access-spike.md ★+451