feat(scopes): 122 « créer/modifier les tiers » entre dans prod-write (#94)

Co-authored-by: Gabriel Radureau <[email protected]>
This commit was merged in pull request #94.
This commit is contained in:
2026-08-15 23:46:47 +02:00
committed by arcodange
parent 3f0955a2d3
commit 279092274c
+21 -3
View File
@@ -143,8 +143,13 @@ export const SCOPES: Readonly<Record<string, Scope>> = {
/** /**
* The narrow production writer, used ONLY by the gated promote apply, and only * The narrow production writer, used ONLY by the gated promote apply, and only
* for what that step actually does: create/modify invoices, attach payments. * for what that step actually does: create/modify invoices, attach payments.
* No thirdparty creation, no product creation, no proposals — those are * No product creation, no proposals — those are rehearsed then applied by a
* rehearsed then applied by a human when they are genuinely needed. * human when they are genuinely needed.
* `122` (thirdparties) WAS excluded on that same reasoning, and the reasoning
* did not survive contact: a supplier invoice needs a supplier, so the scope
* could create the document but not the party it names. The exclusion turned
* every new supplier into a manual step in the middle of a gated flow — which
* is where discipline erodes.
* `162` (contracts) IS included: recording the engagement behind an invoice is * `162` (contracts) IS included: recording the engagement behind an invoice is
* what the piste d'audit fiable asks for, and it recurs (Darnis, then KM). * what the piste d'audit fiable asks for, and it recurs (Darnis, then KM).
* *
@@ -162,7 +167,20 @@ export const SCOPES: Readonly<Record<string, Scope>> = {
// modification de factures » — les factures fournisseur en sont, et leur // modification de factures » — les factures fournisseur en sont, et leur
// saisie est l'opération la plus courante du back-office. Ajouté après un // saisie est l'opération la plus courante du back-office. Ajouté après un
// 403 en production sur la facture Darnis F1048. // 403 en production sur la facture Darnis F1048.
rights: [...READ_ONLY, 12, 14, 162, 1232, 2503], //
// 122 (tiers) : ajouté sur décision de l'opérateur du 2026-08-15, après un
// second 403 — cette fois sur Anthropic PBC, entité américaine distincte
// d'Anthropic Ireland, dont la facture ne pouvait être saisie faute de
// pouvoir créer le fournisseur qu'elle nomme.
//
// CE QUE CE DROIT COÛTE, et il faut le dire : Dolibarr le libelle
// « Créer/MODIFIER les tiers ». Il n'existe pas de droit de création seule.
// Le writer de production peut donc désormais altérer l'identité de
// n'importe quel tiers existant — nom, adresse, identifiants fiscaux — et
// non seulement en créer. C'est la contrepartie assumée : sans lui, toute
// facture d'un fournisseur nouveau s'arrête au milieu du flux gated.
// La suppression (125) reste exclue, comme dans tous les scopes.
rights: [...READ_ONLY, 12, 14, 122, 162, 1232, 2503],
}, },
} as const; } as const;