KamoCRM

Seed every organization a default legal text

FeatureInitializerService
Shipped
14 ஆகஸ்ட், 2026 அன்று 7:35 PM UTC
Author
Kamo
Commit
79d80c3

One hr_legal_settings row per org, unique on org_id, carrying **************** INSERT-ONLY, never an UPDATE. An org that has edited its own wording owns it; a redeploy silently rewriting the sentence its people are asked to legally agree to would be the worst possible behaviour for this string. That also makes the runner idempotent. Orgs created AFTER this runs are covered by the DocsService read fallback rather than by org provisioning, so a future provisioning path that forgot the call cannot ship an org whose default legal text is blank. Both statements retry 40001: a throw from a CommandLineRunner aborts the whole initializer and skips every runner ordered after it.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing