29 lines
608 B
SQL
29 lines
608 B
SQL
-- Quick verification script for RLS status
|
|
-- Run this in Supabase Studio SQL Editor: http://127.0.0.1:54323
|
|
|
|
-- Check if RLS is enabled on all tables
|
|
SELECT
|
|
tablename,
|
|
rowsecurity as "RLS Enabled",
|
|
CASE
|
|
WHEN rowsecurity THEN '✅ Protected'
|
|
ELSE '❌ Not Protected'
|
|
END as "Status"
|
|
FROM pg_tables
|
|
WHERE schemaname = 'public'
|
|
ORDER BY tablename;
|
|
|
|
-- Check existing RLS policies
|
|
SELECT
|
|
schemaname,
|
|
tablename,
|
|
policyname,
|
|
permissive,
|
|
roles,
|
|
cmd,
|
|
qual,
|
|
with_check
|
|
FROM pg_policies
|
|
WHERE schemaname = 'public'
|
|
ORDER BY tablename, policyname;
|