This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Supabase Bulk Row Level Security Policy Applier

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Supabase Bulk Row Level Security Policy Applier lets you enable RLS and apply security policies across multiple tables in a single operation. Instead of opening each table individually, navigating to the RLS section, enabling RLS, creating a policy, and saving — repeating this for every single table — this tool provides a unified checklist of all tables in your Supabase project. You can filter tables by name to quickly find the ones you want to secure. Select any number of tables using checkboxes, choose a policy template from the dropdown, and click Apply. The tool then automatically processes each selected table — enabling Row Level Security if not already enabled, opening the policy creation modal, filling in the policy template, and saving the changes. This turns what could be dozens of manual operations into a single batch action, making database security configuration significantly faster and more consistent.

WHERE IT RUNS

This script runs exclusively on the Supabase web application in your browser. It activates on the table list page and SQL editor views within the Supabase dashboard. It requires the BotGentz extension to inject and execute the script. The tool does not work on the Supabase CLI, the postgres shell, or any third-party database clients — only the web-based Supabase dashboard accessed through a Chromium-based or Firefox browser. It specifically targets pages under *.supabase.co, including the Supabase project dashboard and table management views.

HOW TO USE

After installing the script via BotGentz, navigate to your Supabase project and open the Table Editor or SQL Editor. The tool automatically detects the table list and displays a floating panel on the right side. The panel shows all tables in your project, with checkboxes next to each table entry. Each table displays its name, schema, and current RLS status (enabled or disabled). Use the search box to filter by table name to narrow down your selection. Check the boxes for every table you want to apply RLS policies to. Below the table list, select a policy template from the dropdown — options include "Enable RLS (default)", "Allow SELECT for authenticated", "Allow all operations for authenticated", "Allow SELECT for public", and "Custom: user_id = auth.uid()". A description of each template appears below the dropdown. Click "Apply Policy" and confirm the action. The tool will process each selected table one by one — enabling RLS if needed, opening the policy creation modal, filling in the policy details from the template, and saving. A status message appears when the operation completes, showing how many tables were successfully configured.

THE ACTUAL MECHANISM — WHY IT WORKS

Supabase's web dashboard is built with React and uses a component-based rendering system for its table management. The table list is rendered as rows or cards, each containing table metadata and action buttons. This tool scans the DOM for table items using multiple selector patterns that Supabase consistently uses across versions. For each table, it extracts the name, schema, and RLS status from the visible text content and data attributes. When applying policies, the tool first checks if RLS is enabled on the table — if not, it locates and clicks the RLS toggle switch, then handles any confirmation dialog. For policy creation, the tool locates the action menu on each table item, clicks the menu button, and selects the "Policy" option from the dropdown. It then fills the policy creation modal with template-specific values: the policy name is generated from the template ID, and the "using" clause is populated with the appropriate SQL condition. The tool uses React-friendly event dispatching — setting values via the native setter and dispatching both "input" and "change" events to ensure React registers the updates. This approach works without making direct SQL queries, which would require database credentials and knowledge of the schema. By using the existing UI, the tool works within Supabase's own permission and validation system, and continues to function even if the underlying API changes.

THE PANEL

The floating panel is fully draggable — click and drag the header to reposition it anywhere on the page. The panel's position is saved per site in localStorage, so it reappears exactly where you left it when you return to the project. Double-click the header to snap the panel to the nearest edge (left or right). A collapse button minimizes the panel to a small tab showing a shield emoji badge, keeping it out of the way while still accessible. The table list inside the panel is scrollable and resizes vertically based on the number of tables. Pressing Escape while the panel is focused closes it completely; reopening is done via a small button injected near the page toolbar. All panel interactions are non-blocking — Supabase's main UI remains fully responsive while the panel is open, and the panel updates automatically when you navigate between projects or views.

PLEASE NOTE

This script requires the BotGentz extension (free) to run user scripts on Supabase. Supabase frequently updates its web interface and modal structures; if the tool stops working, check for an updated version within BotGentz's script repository. This tool does not store, transmit, or log any table data, policy definitions, or security configurations — all operations occur locally in your browser with no external network requests except those made by Supabase itself. RLS policies are applied through Supabase's own UI event system, so all changes respect your project permissions and database security rules. The tool does not bypass Supabase's security or permission system; it simply automates the clicks you would otherwise perform manually. For projects with a large number of tables, the tool may take several minutes to complete the operation, as each table is processed sequentially with delays to avoid overwhelming the UI. A progress indicator shows which table is currently being processed. Always double-check your selections and policy template before applying changes, as RLS policies can significantly impact database security and application behavior. The tool only affects tables visible on the current page; to apply policies to all tables, ensure all tables are loaded in the view. The built-in policy templates provide common security patterns; for advanced policies, use Supabase's native policy editor to create custom policies after batch-enabling RLS.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.