Let the shell fetch its org from the session, not the host

FeatureSecurityService
Ya
24 Agosti 2026, 21:28 UTC
Mwandishi
Kamo
Ahadi ya
f5f2fbe

kamo-internal's root layout reads the Host header, strips "internal." and fetches /org/domain/<that>. On a host serving one tenant that is the same question as "which org am I"; on a shared host it is a different question with a wrong answer -- it returns whoever owns the host, so a member who entered a domainless org would be handed KamoCRM Inc.'s branding, features and flags. Adds GET /api/security/org/current, returning the projected record for the organization the caller's SESSION is in. The layout can reach it because it already forwards the Cookie header and a *** cookie exists, so the server can see a session even though sessionStorage is invisible to a document request. Takes no parameter, deliberately. The first draft accepted an id or alias and **************** correctly refused it: that shape makes every org's record enumerable by guessing an alias, and aliases are guessable. The session already knows which org it is in, so a parameter could only ever ask about a different one. With the session resolved the ratchet passes on its own rather than needing a baseline entry. The projection is extracted rather than copied. Two endpoints returning two shapes of the same record is the failure worth preventing -- a client cannot tell which it holds, and they drift the first time only one is updated. 928 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