Row Level Security (RLS) is a database feature that decides, row by row, which records each user is allowed to read or change. It is part of PostgreSQL, the database behind Supabase, and it is the main protection for data in apps where the browser talks to the database directly.
How Row Level Security works
In a traditional app, a server sits between the visitor and the database and decides what each person may see. Many apps built with AI app builders skip that server. The app in the browser sends its requests straight to Supabase, which means the database has to make the decision itself.
It has two parts. First, RLS is switched on for a table. From that moment, according to the Supabase guide to Row Level Security, no data in the table can be reached through the API with the public key until a policy says otherwise. Second, policies are added. A policy is a rule that works like a filter added to every request. A typical one says that a user may read the rows where the owner column matches their own user ID.
Enabled is not the same as correct
A table can have Row Level Security enabled and still show its contents to the wrong people. The setting only says that policies are in force. It says nothing about what the policies allow. A policy whose condition is always true lets every signed-in user read every row, and if it is written for visitors who are not signed in, it lets anyone read them. In both cases the table still counts as having RLS enabled.
This is easy to miss, because the app usually looks right. The screen shows a user only their own records, since the interface filters the list. That filter is a convenience, not a barrier. Anyone can send a request to the database with the app's public anon key and receive whatever the policies permit.
How to check it
Reading the policies helps, but the reliable test is to behave like a user. Create two test accounts and add a record as the first. Then sign in as the second and ask the database for that record directly. Repeat the request without signing in. If the record comes back in either case, the policy is too wide.
A passed test shows that this table kept these two users apart on the day of the test. It should be repeated when the app changes, because a new table or a rewritten policy can undo it. The handover checklist for AI-built apps puts the test in context.
Why it matters for client apps
In a delivered app, Row Level Security is what stands between one customer's records and another's. Explaining it to a client takes one sentence: these are the rules that decide whether one customer can see another customer's data.