Agenda, Agendador, Configurações

This commit is contained in:
Leonardo
2026-03-12 08:58:36 -03:00
parent f733db8436
commit f4b185ae17
197 changed files with 33405 additions and 6507 deletions

View File

@@ -0,0 +1,42 @@
-- BUCKET avatars: RLS por pasta do usuário "<uid>/..."
-- Requer que seu path seja: `${auth.uid()}/...` (no seu código já é)
drop policy if exists "avatars_select_own" on storage.objects;
create policy "avatars_select_own"
on storage.objects for select
to authenticated
using (
bucket_id = 'avatars'
and name like auth.uid()::text || '/%'
);
drop policy if exists "avatars_insert_own" on storage.objects;
create policy "avatars_insert_own"
on storage.objects for insert
to authenticated
with check (
bucket_id = 'avatars'
and name like auth.uid()::text || '/%'
);
drop policy if exists "avatars_update_own" on storage.objects;
create policy "avatars_update_own"
on storage.objects for update
to authenticated
using (
bucket_id = 'avatars'
and name like auth.uid()::text || '/%'
)
with check (
bucket_id = 'avatars'
and name like auth.uid()::text || '/%'
);
drop policy if exists "avatars_delete_own" on storage.objects;
create policy "avatars_delete_own"
on storage.objects for delete
to authenticated
using (
bucket_id = 'avatars'
and name like auth.uid()::text || '/%'
);