PAR-141
0
Reconcile Treasury access on proprietorship transfer & role-permission changes
Pending ReleaseHighUnassignedBusiness
Problem (confirmed in prod)
Business → Treasury access reconciliation is done with ad-hoc syncAllFirmAccounts() calls bolted onto some mutation paths. Two paths that change access never reconcile:
- Proprietorship transfer —
FirmRequestServiceImpl.completeTransferProprietorshipcallsfirms.updateProprietor(...)but never (a) reassigns the Treasury account owner or (b) re-syncs members/authorizers. Result: the new proprietor is locked out of their own firm account (not owner/member/authorizer →canAccessAccountfalse), and the old owner keeps ownership + access. - Role-permission edits —
FirmRoleServiceImpl.addRolePermission/removeRolePermission/deleteRole/renameRolechange what current role-holders can do but never re-sync, so granting/revoking FINANCIAL/ADMIN on a role does not propagate to Treasury membership until an unrelated employment event or a manual/business account sync.
Evidence (prod, 2026-06-11)
- Member/authorizer drift for current employees: 0 (sync-on-employment works).
- Firm accounts whose Treasury owner ≠ current proprietor: 5 (Costco, UMStone, UMTree, UMNet, Deliveroo) — all default accounts; old owner still a member; new proprietor not a member. Costco & Deliveroo have
ACCEPTEDfirm_transfer_requestsrows matching exactly. - This is the recurring reason staff have had to manually run the sync command.
Change
- Depends on PAR-140 (
TreasuryApi.reassignOwner). completeTransferProprietorship: afterupdateProprietor, reassign every live firm account's Treasury owner to the new proprietor andsyncAllFirmAccounts(firmId)(adds new proprietor as member+authorizer, removes old owner if not a current employee).- Add
syncAllFirmAccounts(firmId)to the role/permission mutators (addRolePermission,removeRolePermission,deleteRole,renameRole). - Centralize so the reconcile can't be forgotten again (single helper invoked by all access-affecting writes).
Remediation
One-time fix for the 5 live firms (reassign owner → current proprietor, add as member+authorizer, drop the stale old owner). SQL drafted for review before running against prod.
Acceptance
- After a proprietorship transfer the new owner can immediately use
/business account ...; the old owner cannot. - Granting FINANCIAL/ADMIN to a role immediately grants matching role-holders account access (no manual sync).
- The 5 known firms remediated and re-verified at 0 drift.
Resources
- commita0c4985 Reassign firm accounts on admin proprietor change; make proprietor-change paths atomic (PAR-315)ParadauxIO/hibernia-economy
- commitc1bbb01 Reconcile firm-account access on every manual member/authorizer write (PAR-77)ParadauxIO/hibernia-economy
- commitfa4c3ec Reconcile Treasury access on proprietorship transfer & role changes (PAR-141)MCCitiesNetwork/Business
Comments
No comments yet.
Activity
- ParadauxIO linked a commit — Commit a0c4985 — Reassign firm accounts on admin proprietor change; make proprietor-change paths atomic (PAR-315)
- ParadauxIO linked a commit — Commit c1bbb01 — Reconcile firm-account access on every manual member/authorizer write (PAR-77)
- tesks changed status to Status → Pending Release
- ParadauxIO linked a commit — Commit fa4c3ec — Reconcile Treasury access on proprietorship transfer & role changes (PAR-141)
- tesks created the issue