feat(supabase): files foundation — assets table, private buckets, avatar policies through assets, purge queue, browser and worker RPCs
Migration 20261013100000: asset_status enum, public.assets (server-built keys, lease token, closed rejection reasons), seven private buckets (avatars open with cap and MIME list, six closed), storage.objects SELECT/INSERT policies for avatars evaluated through assets, private.object_purge_queue fed by status and delete triggers (48 h / 1 h grace), storage ceiling, RPCs begin_avatar_upload / confirm_asset_upload / remove_avatar (authenticated) and claim_avatar_jobs / complete_avatar_job / reject_avatar_job / mark_quarantine_purged / claim_purges / ack_purge / claim_quarantine_leftovers / expire_pending_uploads (service_role), explicit revokes and column grants. pgTAP 010 (125 checks: allowed and denied twins, policy census, stale lease, supersede, removal, leftovers, cascade, ceiling), 001 census extended, database.types.ts regenerated from the real stack, schema-types test counts input arguments only.
This commit is contained in:
1 parent
3f1105bf39
commit
614887470c
5 files changed
+1346
-6
No files matched your search
@@ -62,7 +62,7 @@ select is(
|
||||
(select string_agg(p.proname::text, ',' order by p.proname::text collate "C")
|
||||
from pg_proc p join pg_namespace n on n.oid = p.pronamespace
|
||||
where n.nspname in ('private', 'audit') and has_function_privilege('authenticated', p.oid, 'execute')),
|
||||
'can_edit_sheet,can_read_sheet_asset_object,can_use_sheet,has_platform_role,is_platform_admin,is_platform_moderator,is_platform_owner,is_support',
|
||||
'can_edit_sheet,can_read_avatar_object,can_read_sheet_asset_object,can_upload_avatar_object,can_use_sheet,has_platform_role,is_platform_admin,is_platform_moderator,is_platform_owner,is_support',
|
||||
'authenticated executes only the policy predicates in private'
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user