Add linked Supabase RLS allowlist#46
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a hosted Supabase RLS layer for TimeFraim's public app tables and documents the linked database bootstrap/data migration workflow. The linked project was migrated from the local Supabase database, durable local data was copied, and RLS now protects the hosted PostgREST surface while the app continues to route data access through the Fastify API.
app_access_usersstores lowercased allowed emails andis_timefraim_allowed_user()gates authenticated app-table access.Changes
supabase/migrations/20260611120000_enable_single_user_rls.sql— creates the allowlist table/function, seeds from existing auth users, enables RLS, and adds app-table policies.AGENTS.md— documents the RLS model and linked Supabase bootstrap/data migration workflow.CLAUDE.md/GEMINI.md— synced from AGENTS.md.Test plan
supabase migration up --local/tmp/timefraim-linked-migration-20260611045729supabase db push --db-url "$LINKED_SUPABASE_POSTGRES_URL" --include-all --dry-runsupabase db push --db-url "$LINKED_SUPABASE_POSTGRES_URL" --include-allauth.users,auth.identities,storage.buckets, andstorage.objectssupabase functions list --project-ref <linked-ref>confirmed no linked Edge Functions; repo has nosupabase/functionssources to deploypnpm agent-briefs:checkpnpm lintpnpm typecheckgit diff --checkCreated by Codex