Added category creation interface

This commit is contained in:
Alexis
2025-04-15 15:34:05 +02:00
parent c25c10f7b7
commit 58f3783b13
12 changed files with 285 additions and 32 deletions

View File

@@ -440,6 +440,20 @@ create policy "Allow anonymous access to published event categories" on public.c
)
);
create policy "Allow GMs to add new events categories"
on public.calendar_event_categories
for insert
with check (
exists (
select 1
from public.calendars c
join public.worlds w on w.id = c.world_id
where
c.id = calendar_event_categories.calendar_id
and w.gm_id = auth.uid()
)
);
create policy "Allow GMs to update their events categories"
on public.calendar_event_categories
for update