Skip to content

Commit ece48a1

Browse files
Fix billing records RLS
1 parent f6bdc8f commit ece48a1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- First, just drop the existing policy and create a more secure SELECT policy
2+
DROP POLICY IF EXISTS "Users can view their billing records" ON public.billing_records;
3+
4+
CREATE POLICY "Users can view their own billing records"
5+
ON public.billing_records
6+
FOR SELECT
7+
TO authenticated
8+
USING (auth.uid() = user_id);

0 commit comments

Comments
 (0)