mirror of
https://github.com/fergalmoran/supanextail.git
synced 2026-01-15 21:16:55 +00:00
Fix avatar upload
- Fix the display of an already updated avatar - Fix the storage policy. Only authenticated users can upload an avatar
This commit is contained in:
@@ -33,9 +33,9 @@ create policy "Avatar images are publicly accessible."
|
||||
on storage.objects for select
|
||||
using ( bucket_id = 'avatars' );
|
||||
|
||||
create policy "Anyone can upload an avatar."
|
||||
create policy "Any authenticated user can upload an avatar."
|
||||
on storage.objects for insert
|
||||
with check ( bucket_id = 'avatars' );
|
||||
with check ( bucket_id = 'avatars' and auth.role() = 'authenticated' );
|
||||
|
||||
-- inserts a row into public.profiles
|
||||
create function public.handle_new_user()
|
||||
|
||||
Reference in New Issue
Block a user