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

test: never call revoked internal rollout helper as authenticated test actor

davoodmehraban89 committed Oct 16, 2026 at 16:48 UTC 2970e40fd268f8c59147f225f7caa17ee4c26cd8
1 file changed +1 -2
supabase/tests/phase1a_stage1_sql_behavior.sql
+1 -2
@@ -54,8 +54,7 @@ DECLARE org_a uuid:=current_setting('finora_test.org_a')::uuid;
54 lines jsonb:='[{"accountId":"ACC_STAGE_1","debit":100,"credit":0},{"accountId":"ACC_STAGE_2","debit":0,"credit":100}]'::jsonb;
55 d jsonb;p jsonb;rv jsonb;ver bigint;denied int:=0;original_copy jsonb;
56 BEGIN
57 - IF private.finora_phase1a_mode(org_a)<>'enforce' OR private.finora_phase1a_mode(org_b)<>'enforce'
58 - THEN RAISE EXCEPTION 'FINORA_STAGE1_GUARD_FIXTURE_FAILED';END IF;
57 + -- Guard mode is checked by administrator in fixture; authenticated users cannot call its private helper.
58 d:=public.finora_journal_create_draft(org_a,'VOUCHER_A_1',header,lines);
59 IF (d#>>'{voucher,version}')::bigint<>1 THEN RAISE EXCEPTION 'FINORA_STAGE1_DRAFT_VERSION_FAILED';END IF;
60 -- Duplicate click returns same header and no duplicate lines.