Skip to content

Commit

Permalink
remove storage policy
Browse files Browse the repository at this point in the history
  • Loading branch information
hereAlexT committed Dec 10, 2023
1 parent 6ddc94d commit 3e399a1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions backend/supabase/migrations/20231206094546_storage_policy.sql
Original file line number Diff line number Diff line change
@@ -1,25 +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_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_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])));
-- 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 3e399a1

Please sign in to comment.