Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-28 00:52:42 +00:00
co-authored by renee-png
parent 5aa0cb61e1
commit 901f50cb01
@@ -0,0 +1,9 @@
-- Remove overly-permissive public SELECT policy on payment_requests
DROP POLICY IF EXISTS pr_select_public_by_id ON public.payment_requests;
-- Authenticated users can see payment requests they created, or admins see all
CREATE POLICY pr_select_owner_or_admin
ON public.payment_requests
FOR SELECT
TO authenticated
USING (is_admin(auth.uid()) OR created_by = auth.uid());