Blog ·
Row level security, explained without code
The setting that decides whether your users can see each other's data.
If your app runs on Supabase, every piece of data lives in a table. Each customer, booking or document is a row. Row level security is the rule that decides who may read or change each row.
Without it
Anyone who knows the address of your database can ask for every row. That includes other users' bookings, files and emails. The app may look fine, because the screens only show your own data. The data underneath is still open.
With it
Each table gets a rule, written once, like "a user can only see bookings where they are the owner". The database checks that rule on every request, whatever the screen does.
How to tell if yours is on
- In the Supabase dashboard, tables without it are flagged.
- Make two accounts. Log in as the first and copy the link to something private. Open it as the second. If it opens, the rule is missing or wrong.
A common trap
Turning it on but writing a rule that says "any logged-in user can read everything". That's on, but it protects nothing. Ask for rules that mention the owner.
Ten minutes of checking here prevents the kind of mistake that ends a young company.
