Resolve the domain on /org/current server-side

FixSecurityService
Ya
24 Agosti 2026, 22:20 UTC
Mwandishi
Kamo
Ahadi ya
102a4f2

internal.kamocrm.com failed to render with "Invalid organization data: missing 'id' or 'domain'". Organization has no `domain` field -- it has a `domains` collection -- and the client's Organization.fromJSON throws without one, before the shell renders. The by-host lookup gets away with it because its caller injects the host it asked about; /org/current has no such host. Resolved here rather than derived on the client, because the client cannot do it correctly. `domains` is a LAZY collection and Hibernate6Module serializes an uninitialized one as null, so a client falling back to {alias}.kamocrm.com would name the platform organization "crm.kamocrm.com" and look for its branding in a folder that does not exist -- a quieter failure than the one being fixed. resolvePrimaryDomain already answers this exactly as the theme provisioner does: a DNS-verified active domain, then any active one, then {alias}.kamocrm.com. Returning a Map keeps every field the projection already produced and adds the one the client needs; ids still leave as strings, since the wire mapper's rule is by value range and applies inside a Map too. 938 tests pass.

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