Stop losing organizations to swallowed exceptions, and accept the full create payload

FixSecurityService
Ya
7 Agosti 2026, 05:26 UTC
Mwandishi
Kamo
Ahadi ya
3903267

createOrganization could destroy a customer's signup and report nothing useful. Transaction integrity: - Five Docstors ran behind try/catch that only looked safe. ChildOrgTemplateSeedingService, BillingSetupService, SystemUserBackfillService and (via PostAuth***Service) DailyAllotmentService are all @Transactional and JOIN this transaction, so an exception escaping one leaves it rollback-only no matter who catches it. The method returned 200, the commit then raised UnexpectedRollbackException, and the customer got a blank 500 with no organization — because an optional billing step had a bad day. Billing and System-User setup now run after commit in their own transactions; template seeding, which must precede owner creation, fails loudly through a new OrgCreationFailedException handler; and a **************** check before the success return catches every remaining vector, including ones inside third-party call chains. - **************** was dispatched INSIDE the open transaction under a comment claiming otherwise. It is @Async and opens with **************** so the child org usually was not committed yet and provisioning died into a log line — leaving web-alias customers on /setup/dns forever, waiting on GoDaddy records nobody ever pushed. Now afterCommit. - DomainVerificationWatcher CNAME-probed the apex, which never carries one, and wrote the result back unconditionally — actively downgrading is_dns_verified on the brand-new web-alias orgs that were already correct. It now probes the KnownAliases labels and only ever upgrades. Also: a taken domain is checked before the first write and answered with 409 instead of a rollback 500; the owner's OTK is minted from resolved rights rather than every RoleRightType, which was handing back rights the parent's model had NUKEd; wizard-created domains get their KnownAliases child rows; resolveCreatorContext reads the session via the attribute-then-cookie helper and the CREATE_CHILD_ORG gate now fails closed, where a ***-cookie caller previously skipped it entirely; and a rolled-back create no longer leaves an orphan *** in Redis. Create payload now carries the Behavior & Labeling fields the wizard collects — website, contact email, white-label identity, social links, language, currency, isPrivate, the eight custom labels and the branding selectors — with per-column truncation and a null meaning "leave the default". An untouched custom label writes nothing, because resolveTitle treats a null synced flag as "inherit" and writing false would sever a new child from a parent that had renamed its nouns. isPrivate is gated by assertCanSetPrivate once the parent is attached, and branch-types/creatable now returns allowOwnersPrivateOrgs so the wizard can disable the choice instead of collecting a 403.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei