Terminal
This commit is contained in:
@@ -27,10 +27,12 @@ LANGUAGE sql STABLE SECURITY DEFINER SET search_path = public AS $$
|
||||
WHERE s.id = _student
|
||||
-- SECURITY DEFINER bypasses the students policy, so the entitlement is
|
||||
-- re-checked here. Without this an authenticated caller could resolve any
|
||||
-- student's name by guessing uuids.
|
||||
-- student's name by guessing uuids. The service_role arm keeps server-side
|
||||
-- rendering working, since it holds no app role and would otherwise get NULL.
|
||||
AND (public.can_access_student(_student)
|
||||
OR public.is_billing_admin()
|
||||
OR public.is_auditor());
|
||||
OR public.is_auditor()
|
||||
OR pg_has_role(current_user, 'service_role', 'MEMBER'));
|
||||
$$;
|
||||
|
||||
GRANT EXECUTE ON FUNCTION public.student_display_name(UUID) TO authenticated;
|
||||
|
||||
Reference in New Issue
Block a user