In plain words
Database access rules, like Supabase's row-level security, make the database itself check which rows each user may read or change, whatever the app's code asks for.
Where you see it
Lovable apps talk to Supabase straight from the browser, using a key anyone can find in the page. If row-level security (RLS) is off on the notes table, that key reads every user's notes, and the Supabase table editor labels the table "Unrestricted".
What goes wrong
- Filtering in the app instead of the database
An .eq("user_id", user.id) in your React code means nothing to someone with the public key and a terminal. The database has to refuse on its own.
- A policy that allows everything
A policy with using (true) is a lock that's never closed. The warning disappears and the leak stays.
create policy "allow all" on notes for all using (true); - Testing only as yourself
Everything looks right because you own all the test data. Sign in as a second user and try to open the first user's rows.
What to tell your agent
Quick check
Sign in to earn +10 XP for itQuill's code filters notes by the logged-in user, but RLS is off. Who can read every note?