chore(db): drop unused global RBAC flag - #3138
Conversation
RBAC is always on, so is_rbac_enabled_globally and CAPGO_RBAC_ENABLED only added vault lookups and dead GUC setup. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (5)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe change removes the global RBAC function and Vault flag, updates generated database types, and adjusts seed data and tests to verify the removal. ChangesGlobal RBAC flag removal
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: 🔵 Low · up to This PR removes an unused RBAC database function and related configuration. It is mergeable with owner confirmation that no clients or exposed RPC contract depend on the function; otherwise consumers could lose compatibility unexpectedly. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Warning Review ran into problems🔥 ProblemsRepository analysis: Couldn't refresh Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|



Summary (AI generated)
public.is_rbac_enabled_globally()and delete theCAPGO_RBAC_ENABLEDVault secretcapgo.rbac_enabledtest GUC setupMotivation (AI generated)
RBAC is already always on. The global flag was unused: no checkers, RLS policies, or app code called it. It only added a Vault lookup helper and dead test config.
Business Impact (AI generated)
Removes a dormant kill switch that could have been mistaken for a real RBAC control. Authorization stays RBAC-only with one less secret and function to operate.
Test Plan (AI generated)
bunx supabase migration up(orbun run supabase:db:reset) appliesremove_rbac_global_flagSELECT public.is_rbac_enabled_globally();fails with undefined functionSELECT name FROM vault.secrets WHERE name = 'CAPGO_RBAC_ENABLED';returns no rowsbun run supabase:with-env -- bunx vitest run tests/security-definer-execute-hardening.test.ts tests/rbac-permissions.test.ts26_test_rls_policies.sqlstill passes, including the deleted-helpers assertionGenerated with AI
Made with Cursor
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
Tests