How do I check Supabase RLS?
Last checked 31 Aug 2026
Short answer
Ask Lovable to list every table and its row-level security status and policies in plain language — Lovable Cloud users don't have Supabase dashboard access, so this has to go through chat.
Why this needs asking, not clicking
If you're on Lovable Cloud, Supabase is managed by Lovable and you don't have direct dashboard access — you review RLS through Lovable's chat and its Security view, not Supabase's own UI. If you connected your own Supabase project, you can also check policies directly in Supabase's dashboard.
What to ask Lovable
List every table in the database, whether row-level security is enabled on it, and describe each policy in plain English — who can select, insert, update and delete rows.
Read the answer carefully. Look for:
- Tables with RLS disabled — anyone with the anon key can read/write them.
- Policies that say
USING (true)— meaning anyone can access any row, which defeats the purpose. - Write policies without a matching
WHERE user_id = auth.uid()-style check, letting one user edit another's rows.
Confirming roles are set up safely
Confirm my roles are stored in a separate user_roles table (not a column on profiles), and that RLS policies check that table via a security-definer function, not a column a user could edit themselves.
What usually goes wrong
A table gets RLS enabled early on with a permissive "allow all while testing" policy, and it's never tightened before launch. Re-check every table's policies specifically before going live, not just the ones you remember creating. See /questions/can-users-access-my-database and /questions/can-users-access-other-users-information for the practical failure modes this prevents.
Sources
Was this answer helpful?
Related questions
- AnswerHow do I make Lovable perform a security review without changing anything?Explicitly tell Lovable to run in read-only review mode — ask it to report findings only and not touch any code, then decide what to fix yourself.
- AnswerHow do I stop bots?Add a CAPTCHA (e.g. Cloudflare Turnstile) to public forms, validate inputs server-side, and rate-limit submissions — client-side-only checks like a hidden field are easy for real bots to bypass.
- AnswerHow do I prevent spam registrations?Verify email addresses on sign-up, add a CAPTCHA to the registration form, rate-limit sign-up attempts per IP, and check the token server-side before creating an account.
- AnswerHow do I protect admin pages?Check the user's role server-side (in the database query or Edge Function) using a dedicated user_roles table — hiding an admin link in the navigation menu doesn't stop someone visiting the URL directly.