REVOKE EXECUTE ON FUNCTION public.approve_payroll_run(uuid) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.generate_payroll_run(date, date, date) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.pay_payroll_run(uuid, uuid, date) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.record_staff_advance(uuid, date, numeric, uuid, text) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.can_access(text) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.can_edit(text) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.require_access(text) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.is_admin() FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.has_role(uuid, app_role) FROM anon, public;
REVOKE EXECUTE ON FUNCTION public.grant_first_admin() FROM anon, public;

GRANT EXECUTE ON FUNCTION public.approve_payroll_run(uuid) TO authenticated;
GRANT EXECUTE ON FUNCTION public.generate_payroll_run(date, date, date) TO authenticated;
GRANT EXECUTE ON FUNCTION public.pay_payroll_run(uuid, uuid, date) TO authenticated;
GRANT EXECUTE ON FUNCTION public.record_staff_advance(uuid, date, numeric, uuid, text) TO authenticated;
GRANT EXECUTE ON FUNCTION public.can_access(text) TO authenticated;
GRANT EXECUTE ON FUNCTION public.can_edit(text) TO authenticated;
GRANT EXECUTE ON FUNCTION public.require_access(text) TO authenticated;
GRANT EXECUTE ON FUNCTION public.is_admin() TO authenticated;
GRANT EXECUTE ON FUNCTION public.has_role(uuid, app_role) TO authenticated;