feat: add magic-link admin login and speaker materials portal
Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
0b6d1f2b6f
commit
68fecc2ad1
28 files changed
+1623
-232
No files matched your search
@@ -0,0 +1,21 @@
|
||||
create or replace function public.owns_speaker_session(p_session_id uuid)
|
||||
returns boolean
|
||||
language sql stable security definer set search_path = '' as $$
|
||||
select public.current_email() is not null and exists (
|
||||
select 1
|
||||
from public.session_speakers assignment
|
||||
join public.sessions talk on talk.id = assignment.session_id
|
||||
join public.slots slot on slot.id = talk.slot_id and slot.event_id = talk.event_id
|
||||
join public.registrations registration
|
||||
on registration.event_id = talk.event_id
|
||||
and registration.contact_email = assignment.contact_email
|
||||
where assignment.session_id = p_session_id
|
||||
and assignment.contact_email = public.current_email()
|
||||
and registration.type in ('speaker', 'staff')
|
||||
and slot.type = 'session'
|
||||
);
|
||||
$$;
|
||||
|
||||
revoke all on function public.owns_speaker_session(uuid) from public, anon;
|
||||
grant execute on function public.owns_speaker_session(uuid) to authenticated, service_role;
|
||||
notify pgrst, 'reload schema';
|
||||
Reference in new issue
Block a user