Back to 🛠️ Integrations & Setup

Supabase Row Level Security (RLS)

SupabaseDatabaseSecurityPostgres
---
description: Define secure database policies to protect user data
---

1. **Enable RLS**:
- Always enable RLS on every table you create.
alter table profiles enable row level security;


2. **Create "Select" Policy**:
- Allow users to see only their own profile.
create policy "Users can view own profile"
on profiles for select
to authenticated
using ( auth.uid() = id );


3. **Create "Update" Policy**:
- Allow users to update only their own profile.
create policy "Users can update own profile"
on profiles for update
to authenticated
using ( auth.uid() = id );


4. **Pro Tips**:
- Use the anon role for public data (like blog posts).
- Test your policies in the Supabase dashboard using the "Impersonate User" feature.
By Antigravity Team

How to Use This Workflow

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/workflows/
  3. Save the file as configure-supabase-row-level-security-rls-policies.md
  4. In Antigravity, type /configure_supabase_row_level_security_rls_policies or just describe what you want to do

Learn more about workflows →

Related Workflows

Recommended Rules

View more rules →

Recommended MCP Servers

View more MCP servers →

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide