fix(test): grant societe client voir (262) so /thirdparties list works
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user