GET/PATCH the org's default legal text

FeatureDocsService
Shipped
August 14, 2026 at 7:35 PM UTC
Author
Kamo
Commit
c7e84df

/api/docs/legal/settings, behind the same guarded() funnel as every other mapping on this controller. The read NEVER creates a row: it resolves to LegalDefaults when the org has none. That keeps the package editor's seed fetch side-effect free and is what covers organizations created after the KamoInitializer seed ran — the row is materialized on the first save, where a write belongs. The right set is deliberately wider than the package endpoints'. This endpoint is reached from the Legal & Compliance settings tab (MANAGE_HRS_SETTINGS) and from the package editor (MANAGE_LEGAL_AND_COMPLIANCE); either right alone 403s a screen on a field it owns. Safe to widen because it is one org-level string of boilerplate — no roster, no assignment, no evidence — and a regression test pins that the widening does not reach list/create/audience-preview. PATCH semantics: an absent field is untouched, an empty string is a deliberate clear. Publish already refuses a blank attestation, so a cleared default only makes the author write their own.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing