Urgent.News

What's breaking now, across thousands of outlets.

Tech

GRANT ALL to anon is the wrong fix for Supabase 42501 after Oct 30

From Oct 30, 2026, Supabase will apply a change to existing projects: new tables in public won't be visible to the Data API until you grant access. Supabase's changelog puts it like this: "Once the change is rolled out to your project, new tables you create in public schema require an explicit opt-in (via a Postgres grant ) before the Data API can see them. Existing tables are not affected in…

On October 30, 2026, Supabase implemented a change affecting existing projects: new tables in the public schema will no longer be visible to the Data API until an explicit grant is provided. Existing tables are unaffected and retain their current grants. When the change is implemented, the first new table added will likely result in a 42501 permission denied error. The common quick fix suggested by AI assistants, granting all privileges to the anon role, is not the correct solution.

The 42501 error can occur due to three reasons: no grant, a grant exists but RLS is hiding rows, or a violation of the row-level security policy. A broad grant does not resolve the other two issues. Granting all privileges to the anon role is incorrect because the anon role represents the public key in every browser loading the app, and most privileges are unnecessary for signed-out visitors.

First, enable Row-Level Security (RLS) on all tables before granting any privileges. With RLS enabled and no policies, the table returns no data to API roles, providing a safe starting point. Then, grant only the specific verbs each table requires. For a typical per-user table, signed-in users need SELECT, INSERT, and UPDATE privileges, while signed-out visitors only need SELECT.

Create policies to enforce these privileges. For a table intended to be public, such as a published product list, grant SELECT to the anon role and create a policy limiting visibility to published products.

Lastly, review older tables to ensure their grants align with the new requirements. Use two queries: one to check what anon and authenticated roles can do on each table, and another to identify tables with RLS disabled and grants for anon or authenticated roles. Only revoke grants if necessary, ensuring public pages remain functional.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Echoes of the Terminal: a haunted shell that runs on your own machine

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built Echoes of the Terminal is a shell that answers back. You type git push --force .

  • "Echoes of the Terminal" is a shell that responds to commands on your machine.
  • It warns about dangerous commands like "git push --force" while remarking on harmless ones.
  • The software offers a command-line interface called "haunt" to take control of the real shell.

Ghostty 1.4.0

Article URL: https://ghostty.org/docs/install/release-notes/1-4-0 Comments URL: https://news.ycombinator.com/item?id=50261998 Points: 286 # Comments: 101

More from Tuesday 27 October →