@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / adcfaf2
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 15:45 UTC

test: require C8 policy publisher FK index

davoodmehraban89 committed Oct 1, 2026 at 21:38 UTC adcfaf27daa3bb93cf7b3898ae2a7f4c5bc4832a
1 file changed +1
supabase/tests/office_c8_runtime_security.sql
+1
@@ -17,6 +17,7 @@ do $$ begin
17 end $$;
18
19 do $$ begin
20 + if not exists(select 1 from pg_indexes where schemaname='private' and indexname='office_workflow_policy_versions_published_by_idx') then raise exception 'policy published_by FK index missing'; end if;
21 if not exists(select 1 from pg_indexes where schemaname='private' and indexname='office_workflow_instances_attached_by_idx') then raise exception 'attached_by FK index missing'; end if;
22 if not exists(select 1 from pg_indexes where schemaname='private' and indexname='office_workflow_events_actor_fk_idx') then raise exception 'actor_id FK index missing'; end if;
23 if has_table_privilege('anon','private.office_workflow_instances','SELECT') or has_table_privilege('authenticated','private.office_workflow_instances','SELECT') then raise exception 'runtime instance table leaked to client roles'; end if;