@adobedjangir/commerce-admin-audit-log
v1.0.11
Published
Audit log + revert add-on for @adobedjangir/commerce-admin-management. Records every system_config change with old/new/actor and exposes a UI tab to inspect + revert.
Maintainers
Readme
@adobedjangir/commerce-admin-audit-log
Audit-log + revert add-on for
@adobedjangir/commerce-admin-management.
Records every system-config change (old → new, actor, timestamp) and adds an Audit Log tab to inspect, filter, and revert changes.
What it adds
| Piece | Where |
|---|---|
| Audit Log page | System nav — paginated, filterable table of every change |
| system-config-audit-list action | Reads the audit collection (newest first, filters) |
| Server-side hook (./hook) | Core's save action calls recordAuditEntries(...) on every write |
Each entry captures: scope, scope_id, path, action (create/update/delete),
oldValue, newValue, changedBy, changedAt. Sensitive fields are stored as
[ENCRYPTED] (never plaintext) and can't be reverted from the UI.
Filtering & revert
- Filter by scope, action, path substring, actor, and date range.
- Revert an entry to roll a value back (create → deletes the override; update/delete → writes the previous value back).
Revert and delete are admin-only (delete supports single + multi-select) when the
ims-accessRBAC add-on is installed. Without RBAC, revert is open.
Install
npm install @adobedjangir/commerce-admin-audit-log
aio app deploynpm install auto-registers the tab + action via the core discovery mechanism.
aio app deploy is required so that:
- the
AuditLogaction package deploys, and - core's
system-config-saveaction rebuilds and bundles this add-on's hook (so writes are actually recorded).
How recording works
Core's save action soft-requires @adobedjangir/commerce-admin-audit-log/hook.
When installed, every successful config write is appended to the
system_config_audit ABDB collection (best-effort — a logging failure never
fails the save). When not installed, audit entries are computed but discarded.
Notes
- The audit collection is capped (oldest entries compacted) to bound growth.
- Writes use
insertManywith a per-documentinsertOnefallback for ABDB driver compatibility.
License
Apache-2.0
