Mega push vol 5, working on messaging now
This commit is contained in:
17
supabase/migrations/018_user_avatars_storage.sql
Normal file
17
supabase/migrations/018_user_avatars_storage.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Allow authenticated users to upload to user-avatars folder
|
||||
CREATE POLICY "Authenticated users can upload user avatars"
|
||||
ON storage.objects FOR INSERT
|
||||
TO authenticated
|
||||
WITH CHECK (bucket_id = 'avatars' AND (storage.foldername(name))[1] = 'user-avatars');
|
||||
|
||||
-- Allow authenticated users to update (upsert) their user avatars
|
||||
CREATE POLICY "Authenticated users can update user avatars"
|
||||
ON storage.objects FOR UPDATE
|
||||
TO authenticated
|
||||
USING (bucket_id = 'avatars' AND (storage.foldername(name))[1] = 'user-avatars');
|
||||
|
||||
-- Allow authenticated users to delete user avatars
|
||||
CREATE POLICY "Authenticated users can delete user avatars"
|
||||
ON storage.objects FOR DELETE
|
||||
TO authenticated
|
||||
USING (bucket_id = 'avatars' AND (storage.foldername(name))[1] = 'user-avatars');
|
||||
Reference in New Issue
Block a user