fix: update profile visibility policies to restrict access to user profiles

This commit is contained in:
Rotimi Best
2025-12-05 06:07:39 +01:00
parent 35b9afdde5
commit bf614fd782
2 changed files with 10 additions and 1 deletions
@@ -1 +0,0 @@
DROP POLICY "Public profiles are viewable by everyone." ON "public"."profile";
@@ -0,0 +1,10 @@
drop policy if exists "Public profiles are viewable by everyone." on "public"."profile";
drop policy if exists "Only auth users can read profile" on "public"."profile";
create policy "You can only view your own profile"
on "public"."profile"
as permissive
for select
to authenticated, anon
using ((auth.uid() = id));