Allow anonymous posts in public feed

- update posts_select RLS to allow approved/ok posts regardless of anonymity
- sync baseline and perf-fix migrations with live policy

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
denshooter
2026-04-24 12:38:54 +00:00
parent 0d4b69713d
commit 7e910ce23d
2 changed files with 0 additions and 8 deletions
-4
View File
@@ -207,10 +207,6 @@ CREATE POLICY "posts_select" ON public.posts FOR SELECT
USING (
deleted_at IS NULL
AND review_status IN ('ok', 'approved')
AND (
NOT is_anonymous
OR user_id = (select auth.uid())
)
);
CREATE POLICY "posts_insert" ON public.posts FOR INSERT
WITH CHECK ((select auth.uid()) = user_id);