Skip to content

Commit

Permalink
fix: policy
Browse files Browse the repository at this point in the history
  • Loading branch information
h8570rg committed Sep 17, 2024
1 parent faf3259 commit eca11ae
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions supabase/migrations/20240917134035_local.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
drop policy "Authenticated users can select matches" on "public"."matches";

create policy "Authenticated users can select matches"
on "public"."matches"
as permissive
for select
to authenticated
using (((EXISTS ( SELECT 1
FROM match_players
WHERE ((match_players.match_id = matches.id) AND (match_players.player_id = auth.uid())))) OR (created_by = auth.uid())));



0 comments on commit eca11ae

Please sign in to comment.