Skip to content

How do you make sure every read and write checks that this user is allowed to see this record?Also calledUsers Seeing Other Users’ Data

Module
02/05Module
To read
~11 minTo read

It starts with a failure

An app checks that the user is signed in, then fetches the invoice whose ID is in the page address. What do you think a curious customer finds?

In the module you make your guess first, then read what happened and why.

  1. 01

    Check the record, not only the sign-in

  2. 02

    Check on the server, at every way in

  3. 03

    Say no unless a rule says yes, in the database too

  4. 04

    Send and accept only allowed fields

SpecAccess rules: who can see what

A spec for your own app, as a text file you download. The module also gives you the prompt to paste into the AI you build with (Lovable, Bolt, Replit, Cursor, Claude Code or Codex), a checklist to check what it built, and recommended skills.

  • Sign-in and permission checks
  • A front door for your API (API gateways)

Field notes on this topic