You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE POLICY "profiles_select_owner"ON"profiles"AS PERMISSIVE FOR SELECT TO "authenticated" USING ("profiles"."id"=auth.uid());
12
+
CREATE POLICY "profiles_select_owner"ON"profiles"AS PERMISSIVE FOR SELECT TO "authenticated" USING ((selectauth.uid()) = id);
13
13
14
-
CREATE POLICY "profiles_insert_owner"ON"profiles"AS PERMISSIVE FOR INSERT TO "authenticated" WITH CHECK ("profiles"."id"=auth.uid());
14
+
CREATE POLICY "profiles_insert_owner"ON"profiles"AS PERMISSIVE FOR INSERT TO "authenticated" WITH CHECK ((selectauth.uid()) = id);
15
15
16
-
CREATE POLICY "profiles_update_owner"ON"profiles"AS PERMISSIVE FOR UPDATE TO "authenticated" USING ("profiles"."id"=auth.uid()) WITH CHECK ("profiles"."id"=auth.uid());
16
+
CREATE POLICY "profiles_update_owner"ON"profiles"AS PERMISSIVE FOR UPDATE TO "authenticated" USING ((selectauth.uid()) = id) WITH CHECK ((selectauth.uid()) = id);
17
17
18
-
CREATE POLICY "profiles_delete_owner"ON"profiles"AS PERMISSIVE FOR DELETE TO "authenticated" USING ("profiles"."id"=auth.uid());
18
+
CREATE POLICY "profiles_delete_owner"ON"profiles"AS PERMISSIVE FOR DELETE TO "authenticated" USING ((selectauth.uid()) = id);
19
19
20
20
CREATE POLICY "profiles_service_all"ON"profiles"AS PERMISSIVE FOR ALL TO "service_role" USING (true) WITH CHECK (true);
Copy file name to clipboardExpand all lines: supabase/migrations/20250101000003_create_audio_storage.sql
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
INSERT INTOstorage.buckets (id, name, public)
2
-
VALUES ('audio-files', 'audio-files', false);
2
+
VALUES ('audio-files', 'audio-files', false)
3
+
ON CONFLICT (id) DO NOTHING;
3
4
4
5
CREATE POLICY "audio_files_select_owner"ONstorage.objects FOR SELECT TO authenticated USING (bucket_id ='audio-files'AND (SELECTauth.uid())::text= (storage.foldername(name))[1]);
0 commit comments