Infrastructure low complexity Shared Component backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Infrastructure component that records all membership change events to the audit_logs table. Captures who made the change, which user was affected, which association was added or removed, whether primary status changed, and the timestamp — satisfying the audit trail requirement surfaced during NHF workshops for compliance and coordinator transparency.

Feature: Member Associations

association-audit-logger

Responsibilities

  • Write audit log entries for membership add, remove, and primary-change events
  • Capture acting admin user ID, affected user ID, association ID, and event type
  • Store before/after state for primary association changes
  • Support retrieval of membership change history for display in the admin UI

Interfaces

logMembershipAdded(actorId, userId, associationId)
logMembershipRemoved(actorId, userId, associationId)
logPrimaryChanged(actorId, userId, oldAssociationId, newAssociationId)
logBulkAssignment(actorId, userIds, associationId)
getAuditTrailForUser(userId)
getAuditTrailForAssociation(associationId)

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component