You will make a notes table where each person sees only their own notes, then prove it with two accounts.

1. A table to protect

Create a notes table with a text column and an owner_id column, and set its Owner field to owner_id. See the database quickstart if you need the steps.

2. Choose the rule

  1. Open the table → Access tab.
  2. Under Quick access set, choose Each user sees and changes their own records.
  3. Read the result: all five actions use Record owner, except Add records, which allows Signed-in users.
  4. Studio shows no warnings (a warning would appear if a write were public). Save.

3. Write a custom rule

Say deletes should also need a second factor. In Studio, on the Delete records row, choose List to combine rules and pick Record owner and Signed in with 2FA. A list means all must pass.

4. Prove it

Create two users (Ada and Bob; see Users) and run:
NotFoundError, not “forbidden”, on purpose: a refusal never reveals that the record exists.

5. See the decision in Studio

Open Activity and find Bob’s request. It records which rule decided and why. See Debugging.

What you learned

  • A rule is attached per action (list, get, create, update, delete).
  • Built-in names cover the common cases; custom conditions cover the rest.
  • A list of rules means all must pass.
  • You prove rules by acting as different people.

How rules work

The model behind it.

Condition builder

Build custom rules visually.