Skip to content

Fix result submission column permissions - #32

Merged
jackwsmth merged 1 commit into
mainfrom
fix/result-column-permissions
Sep 18, 2026
Merged

jackwsmth merged 1 commit into
mainfrom
fix/result-column-permissions

Conversation

@jackwsmth

Copy link
Copy Markdown
Collaborator

What this changes

Browser result submissions fail with 42501: permission denied for table results because the payload includes runtime_flags, custom_runtime_id, and revision, but the migrations that added those columns never extended the authenticated role's column-level write grants. Even stock submissions explicitly send these fields as null.

Grant authenticated INSERT and UPDATE on those three columns and extend the database smoke test to exercise them during result creation and editing. Existing ownership policies and restrictions on verification and moderation columns remain intact.

Fixes #27.

This migration was already applied to production (ujlacyedspjfekotemmd) using the Supabase CLI on 2026-09-18. Production verification confirmed the grants and migration-history entry. This PR records the deployed fix in the repository; subsequent database pushes will recognize it as applied. No frontend deployment is required. The profile-handle fix in #29 is separate.

Checks

  • npm --prefix frontend run results:test passes (14 tests).
  • An isolated PGlite database loaded the application migrations, reproduced the original error, and verified that this migration restores result creation and editing.
  • The updated database smoke test passes locally.
  • Local checks confirm ownership enforcement, anonymous-write rejection, and protected-column restrictions remain intact.
  • Read-only production checks confirm the three column grants, RLS enabled, protected columns still restricted, and the migration recorded as applied.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
intelinside Ready Ready Preview Sep 18, 2026 3:21am UTC

Request Review

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
No result files to import.

Site / sign up · Workflow details and retry

@jackwsmth
jackwsmth merged commit 1cc3146 into main Sep 18, 2026
5 checks passed
@jackwsmth
jackwsmth deleted the fix/result-column-permissions branch September 18, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Results cannot be added due to DB or the actual limitation is not presented

1 participant