Add is_archiver db helper function

This commit is contained in:
Jared Schoeny
2025-12-02 00:13:33 -10:00
parent a113d8fa98
commit b3d43e4e50
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
CREATE OR REPLACE FUNCTION public.is_archiver()
RETURNS boolean
LANGUAGE sql
STABLE
AS $function$
select
coalesce(get_my_claim('archiver')::bool,false)
or
coalesce(get_my_claim('claims_admin')::bool,false)
$function$
;