Step 8 · about 10 minutes
Row Level Security, in plain words
The last Supabase step, and the one that decides whether your data is yours. One policy, written and tested.
Row Level Security means: every read and write is checked against rules you wrote, row by row. With RLS on and no rules, nothing is readable — which is the safe place to start from.
Open the SQL Editor and add one rule: signed-in people may read notes.
Terminal
$ create policy "signed-in can read notes"$ on notes for select$ to authenticated$ using (true);Success. No rows returned
- for select = this rule is about reading.
- to authenticated = it applies to signed-in people only.
- using (true) = once signed in, every row passes. Narrow this later to auth.uid() = user_id so people see only their own rows.