Skip to content

Commit

Permalink
upload storage policy
Browse files Browse the repository at this point in the history
  • Loading branch information
hereAlexT committed Dec 6, 2023
1 parent 257d4b8 commit 3b4c437
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions backend/supabase/migrations/20231206094546_storage_policy.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
create policy "Give users access to own folder twar1h_0"
on "storage"."objects"
as permissive
for select
to authenticated
using (((bucket_id = 'note_images'::text) AND ((auth.uid())::text = (storage.foldername(name))[1])));


create policy "Give users access to own folder twar1h_1"
on "storage"."objects"
as permissive
for insert
to authenticated
with check (((bucket_id = 'note_images'::text) AND ((auth.uid())::text = (storage.foldername(name))[1])));


create policy "Give users access to own folder twar1h_2"
on "storage"."objects"
as permissive
for delete
to authenticated
using (((bucket_id = 'note_images'::text) AND ((auth.uid())::text = (storage.foldername(name))[1])));



0 comments on commit 3b4c437

Please sign in to comment.