@objectstack/platform-objects@16.1.0
Patch Changes
-
212b66a: fix(platform-objects): allow import/export on sys_business_unit (#3025)
The Business Units list (Setup → Business Units) surfaces Import/Export buttons,
butsys_business_unitdeclared a restrictiveenable.apiMethodswhitelist of
only the five CRUD verbs. The REST data plane gates import/export on that
whitelist (ADR-0049), so both buttons returned405 OBJECT_API_METHOD_NOT_ALLOWED.This was an unintentional gap, not a deliberate restriction: the object's fields
(external_ref,effective_from/to) are designed for HRIS batch sync, and the
org tree is expected to support bulk import. Added'import'and'export'to
the whitelist. Import reuses thecreate/updateaffordances the object already
grants, and the managed-object reconciliation backstop leaves import/export
untouched (it only strips write verbs). Regression test added. -
d10c4dc: fix(platform-objects): allow import/export on sys_business_unit_member (#3025 / #3391 P0)
Completes the #3025 point-fix. #3392 unblocked
sys_business_unit's Import/Export
buttons (405OBJECT_API_METHOD_NOT_ALLOWED) by adding'import'/'export'to its
enable.apiMethodswhitelist, but the HRIS org-tree sync scenario imports two
tables together — the units and their memberships — and the sibling
sys_business_unit_memberwas left on the CRUD-only whitelist, so the membership
Import/Export path still 405'd. #3391's P0 checklist pairs both tables; this is the
half #3392 missed.packages/platform-objects/src/identity/sys-business-unit-member.object.ts:
apiMethodsgains'import','export'. Import reuses the object's
already-granted create/update affordances; export is a bulk read.- Reconcile-safe: the object is
managedBy:'platform', but
reconcileManagedApiMethodsonly strips generic write verbs
(create/update/upsert/delete/purge—MANAGED_WRITE_VERB_AFFORDANCE). It never
touchesimport/export, so the declared whitelist reaches the REST gate intact
(no false-green: the static whitelist the regression test asserts IS what
apiAccessDenialFromEnableenforces at runtime). - Regression test (
platform-objects.test.ts) locksimport/exportpresence and
CRUD retention. Proven red-before-green: reverting the object edit fails with
expected [...] to include 'import'.
Transitional: #3391 P2 replaces per-object
import/exportdeclarations with a
single derived mapping (import ⊆ create/update, export ⊆ list) and reclaims the
explicit entries on both business-unit objects together. -
Updated dependencies [9e45b63]
- @objectstack/spec@16.1.0
- @objectstack/metadata-core@16.1.0