سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 23:15 UTC
fix(security): use existing edit capability for draft deletion
davoodmehraban89 committed
Nov 18, 2026 at 09:08 UTC
6db4a5af93216a1eca1bc55aae301d7ba44a0f5b
1 file changed
+1
-1
supabase/migrations/20261118100000_journal_document_lifecycle.sql
+1
-1
@@ -140,7 +140,7 @@ LANGUAGE plpgsql SECURITY DEFINER SET search_path=''
140
AS $$
141
DECLARE v public.finora_journal_document_registry%rowtype;
142
BEGIN
143
- PERFORM private.finora_phase1a_authorize(p_organization_id,'delete','journalVoucher');
143
+ PERFORM private.finora_phase1a_authorize(p_organization_id,'edit','journalVoucher');
144
IF coalesce(trim(p_reason),'')='' THEN
145
RAISE EXCEPTION 'FINORA_DELETE_REASON_REQUIRED' USING ERRCODE='23514';
146
END IF;