Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request adds a SQL migration that enables Row Level Security (RLS) on the Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly Related PRs
Poem
✨ Finishing touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 SQLFluff (4.0.0)supabase/migrations/20260204051137_enable_security_settings_rls.sqlUser Error: No dialect was specified. You must configure a dialect or specify one on the command line using --dialect after the command. Available dialects: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces a migration to enable Row Level Security (RLS) on the public.security_settings singleton table to tighten security around global security cutover settings.
Changes:
- Adds a migration that issues
ALTER TABLE "public"."security_settings" ENABLE ROW LEVEL SECURITY;.
| @@ -0,0 +1,2 @@ | |||
| -- Enable RLS on singleton security settings table | |||
| ALTER TABLE "public"."security_settings" ENABLE ROW LEVEL SECURITY; | |||
There was a problem hiding this comment.
This migration enables RLS on "public.security_settings" before the table is created (the table is first created in 20260204103000_mfa_email_otp_guard.sql), so a fresh supabase db reset or a new environment applying migrations in order will fail with relation "public.security_settings" does not exist. To avoid this, move the ALTER TABLE ... ENABLE ROW LEVEL SECURITY into the migration that creates the table or add a migration that both creates the table and enables RLS, ensuring the ALTER TABLE runs only after the table exists.
| ALTER TABLE "public"."security_settings" ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE IF EXISTS "public"."security_settings" ENABLE ROW LEVEL SECURITY; |
|
|
/tip @Judel777 $70 |
|
🎉🎈 @Judel777 has been awarded $70 by Capgo! 🎈🎊 |



Summary (AI generated)
Test plan (AI generated)
bun lint:backendScreenshots (AI generated)
Checklist (AI generated)
bun run lint:backend && bun run lint.accordingly.
my tests
Summary by CodeRabbit