From 7619a4f358e62bdf2fee1128c49e55a552629e29 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Mon, 29 Jun 2026 20:16:59 +0200 Subject: [PATCH] fix(test): grant societe client voir (262) so /thirdparties list works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validating ai_agent_sandbox's key against the sandbox API, /thirdparties returned 404 (the voir_tous ACL trap) while /invoices, /products, /supplierinvoices returned 200. The missing right is `societe client voir` (id 262, "see all thirdparties") — prod's ai_agent has it. Added it to WRITE_IDS so the list endpoint works; other modules' lists are fine with plain `lire`. Co-Authored-By: Claude Opus 4.7 (1M context) --- test/provisionSandbox.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/provisionSandbox.ts b/test/provisionSandbox.ts index 7fd0261..8939cbc 100644 --- a/test/provisionSandbox.ts +++ b/test/provisionSandbox.ts @@ -34,7 +34,7 @@ import userSetup from "./scripts/admin/userSetup.ts"; Write rights to grant `ai_agent_sandbox` (stable Dolibarr rights ids, verified against prod Dolibarr 22.0.4). Each module's read (lire) + create (creer): facture: lire=11, creer=12 - societe: lire=121, creer=122 + societe: lire=121, creer=122, client voir (see-all)=262 societe contact: lire=281, creer=282 fournisseur: lire=1181, facture lire=1231, facture creer=1232 produit: lire=31, creer=32 @@ -44,6 +44,9 @@ const WRITE_IDS = [ 12, // facture creer 121, // societe lire 122, // societe creer + 262, // societe client "voir" (see-all) — REQUIRED for the /thirdparties LIST + // endpoint; without it the list 404s (the voir_tous ACL trap, cf. the + // dolibarr skill SKILL.md). Other modules' lists work with plain `lire`. 281, // societe contact lire 282, // societe contact creer 1181, // fournisseur lire