فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

fix(A03): reject standalone audit and correction history writes

davoodmehraban89 committed Oct 19, 2026 at 11:26 UTC 5ce5479ab2495945d3d74d258b8289739cc411ab
1 file changed +5
src/core/StorageService.js
+5
@@ -301,6 +301,11 @@ class StorageServiceImpl {
301 }
302
303 async put(store, obj) {
304 + // Audit/correction records must be appended in the same transaction as
305 + // their business operation; standalone writes cannot prove atomicity.
306 + if (APPEND_ONLY_STORES.has(store)) {
307 + throw new Error('ثبت مستقیم سابقه ممیزی یا اصلاح سند مجاز نیست');
308 + }
309 if (globalThis.FINORA?.License && !['users', 'settings', 'logs'].includes(store)) globalThis.FINORA.License.assertWritable();
310 this._touch(obj);
311 await this._exec(store, 'readwrite',