diff --git a/supabase/migrations/20240917134035_local.sql b/supabase/migrations/20240917134035_local.sql new file mode 100644 index 0000000..49713b7 --- /dev/null +++ b/supabase/migrations/20240917134035_local.sql @@ -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()))); + + +