Files
moyosapp_beta.0.0.3.3_beta/verify_rls.sql
2026-01-16 19:04:48 +02:00

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;