How do you make sure every read and write checks that this user is allowed to see this record?Users Seeing Other Users’ Data
- Module
- 02/05
- To read
- ~11 min
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.
Check the record, not only the sign-in
Check on the server, at every way in
Say no unless a rule says yes, in the database too
Send and accept only allowed fields
Access 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)