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 protect API keys?Never put API keys in front-end code — store them as secrets used only inside server functions (Edge Functions), where the browser never sees them.
- AnswerAre Lovable websites secure?Lovable includes built-in security scanning and API-key protection, but real security also depends on you setting up row-level security and role checks correctly — it isn't automatic just because you used Lovable.
- AnswerWhere should secrets be stored?In your project's server-side secrets store, used only inside Edge Functions — never in front-end code, client-side environment variables, or committed to your Git repository.
- AnswerHow do I run a security audit on Lovable?Open your project's Security view in Lovable to see automated scan results, then ask Lovable in chat to review RLS policies, role storage, and any exposed secrets in detail.