Organization Settings Service
Component Detail
Description
Backend service that handles CRUD operations on the organization_settings table, enforcing role-based access (Org Admin and Global Admin only). Validates and persists all settings fields with versioned schema support for non-breaking additions. Emits audit_log entries for every mutating operation.
organization-settings-service
Sources & reasoning
Encapsulates all server-side settings persistence and validation. The feature requires server-side enforcement of role gating and schema versioning (per implementation notes) rather than relying on UI-side checks. Audit emission on every write is a hard compliance requirement for the support-access grant mechanism.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Read and update organization settings for the current tenant
- Validate settings payload against the versioned schema
- Enforce Org Admin / Global Admin role gate before any mutation
- Emit audit_log entry on every settings change
- Support schema versioning to allow non-breaking field additions
Interfaces
getSettings(orgId: string): Promise<OrganizationSettings>
updateSettings(orgId: string, patch: Partial<OrganizationSettings>): Promise<OrganizationSettings>
getSettingsVersion(orgId: string): Promise<number>
Relationships
Dependencies (3)
Components this component depends on
Related Data Entities (5)
Data entities managed by this component