سامانه صدور فاکتور و حسابداری
docs: record permission-aware company form commit and verification gaps
davoodmehraban89 committed
Oct 14, 2026 at 20:38 UTC
2a8dc526ec4b3eaae077d0614b060e421c081d91
1 file changed
+4
PROJECT_STATE.md
+4
@@ -673,3 +673,7 @@ Owner reports login blocked with generic 'check internet/VPN' network error on l
673
- Owner authorized autonomous non-destructive fixes and asked to continue execution in this chat without routine narration. Read-only live TinyFish confirmed dashboard expired subscription and successful initial authentication; second navigation run timed out before reaching company editor, so real form write behavior remains UNVERIFIED.
674
- Code evidence: `js/core.js` `canWrite()` blocks expired subscription; `js/companies.js` `commitSaveCompany()` calls `requireWrite()`; `js/organization-rbac.js` selects organization license and overwrites `user.subscription`, which can explain a mismatch with an account-level lifetime license. No database license mutation authorized or performed; do not bypass server licensing/RLS.
675
- PR #140 company-form action-state tests Quality and Security passed at original head `999e4324ac81d88ab0a220c3639f09fae553de94`, but protected-main merge rejected by 3 required status checks. Next: align company-form button affordance with actual write permission; retest; check required status contexts, then merge only if gates pass. Live organization license and financial records remain unchanged.
676
+
677
+### 2026-10-14 Company form permission-aware action — CODE COMMITTED / QA PENDING
678
+- On PR #140 branch, commit `5217391f406de1f1783d15cc437597c105c6e3f2` updates `js/companies.js` `updateCompanyFormAction()` to use the same `canWrite()` guard as `commitSaveCompany()`, so the Save button cannot misleadingly enable while organization subscription blocks writes; tooltip directs user to active organization subscription. No bypass of licensing, RLS or data mutation.
679
+- Preceding continuity commit `8060e68dbe6cdbf9965ab9e3dd717c5246fd0847`. GitHub workflow list for new head initially empty; full CI and real authenticated form behavior remain UNVERIFIED. PR not merged. Prior merge attempt rejected by branch protection requiring 3 status contexts. Next: obtain required status checks and test disabled/enabled states with active/expired organization license; independently investigate organization-vs-profile lifetime license mismatch against live DB with proper access. No live data modified.