A public contact/lead form needs anonymous users to insert rows into a table, so RLS was enabled with CREATE POLICY ... FOR INSERT TO anon WITH CHECK (true) plus GRANT INSERT ON the table TO anon and GRANT USAGE, SELECT ON SEQUENCE TO anon. Inserts still fail, alternating between "permission denied for table" (42501) and "new row violates row-level security policy for table" (42501). The two errors have different causes: the first is the GRANT layer, the second means the policy ran and returned false — the session was not actually inserting as a role covered by the policy. A maintainer diagnosed that users of the form were not actually signed in as the anon role the policy targeted.