Active-Company Resolution Team-Precedence Automation: The Same Bug, Independently Caught a Second Time

Belonging to more than one organization means a system has to choose — silently, correctly, every time
A person who belongs to several organizations inside the same product isn't an edge case in a system built for organizations that serve multiple clients — it is a completely ordinary situation for staff. The moment more than one organization is a valid possibility, some piece of code has to decide which one to open by default, and that decision either reflects how the person actually uses the product — as staff, most of the time, at the organization they work for — or it reflects an accident of list order that has nothing to do with their actual role.
How the underlying problem shows up before you fix it
A person who belongs to more than one organization sometimes opens the application on an organization other than the one they intended, with no error and no explanation of why that one was chosen.
The default organization a multi-organization member lands on depends on the order memberships happen to be returned in, rather than on any deliberate preference for their actual working role.
Someone with a genuine staff or team role at one organization also happens to hold a client or portal-only role at a different, often older, organization — and the two roles are not distinguished when choosing a default.
A remembered "last used" organization exists and works correctly when present, masking the fact that the FALLBACK path — used the very first time, or whenever that memory is cleared — has no equivalent care put into it.
The exact same category of defect has already been found and fixed once, in a completely different product built by the same team, and nobody has specifically checked whether an unrelated codebase implementing the identical concept made the identical mistake.
Why a working "remembered organization" feature can hide a broken fallback
It's natural to build and test the "remember what I chose last time" path first, since it is what a returning user experiences on every visit after their first — and once that path works, it's easy to treat the code as complete. The fallback used before any choice is remembered, or after that memory is cleared, gets exercised far less often in normal testing, which is exactly the gap where "just take the first item in the list" quietly becomes the actual behavior for a specific, real situation that testing didn't specifically construct: a person genuinely belonging to more than one organization under two different kinds of role.
How Centriu Maestro closed a real incident by naming the actual, previously-unstated rule
The incident was concrete and dated: an internal admin who was also a client-portal contact on a separate, older organization opened Centriu Maestro and landed on that older organization — seeing a client's own view rather than their own staff permissions and data, with the interface giving no indication that a choice had even been made, let alone which one. The resolution logic that decides which organization to open was checking, first, whether the person had a remembered choice from a previous session that still matched one of their current memberships — a correct and working check — and falling back, whenever that check found nothing, to simply the first membership in an unordered list. Nothing in that fallback distinguished a genuine team or staff role from a client or client-contact role; it took whichever came first, and for this specific person, that happened to be the older client-portal organization.
The fix inserts a real preference into exactly that fallback path: a small check that classifies a membership as "team" whenever its role is anything other than client or client-contact, and looks for a team membership BEFORE falling all the way through to an arbitrary first entry. The result is a three-step resolution, in order: a remembered organization from a previous session, if one still matches; otherwise, an organization where the person holds a genuine team role; and only if neither of those applies, the first membership on record. The fix is deliberately narrow — eight lines, touching only the fallback step, leaving the already-correct "remembered choice" behavior completely untouched.
Worth stating plainly, because the commit that fixed this says so directly: this is the identical defect class already found and fixed once before, in Centriu Link's own, completely separate authentication code. That earlier fix did not, and structurally could not, protect Maestro — the two products maintain their own independent implementations of the same underlying concept, with no shared code between them at this layer. Finding and closing the same category of gap here required looking at Maestro's own logic specifically, on its own terms, rather than assuming a fix made once somewhere else had already covered every place the same idea appears.
What is actually built today
A three-step resolution order for which organization to open by default: a remembered previous choice first, a genuine team-role membership second, and only then the first membership on record.
A role classification that treats any role other than client or client-contact as "team" for the purpose of this preference, checked directly against each of a person's current memberships.
The already-correct "remembered organization" behavior left completely unmodified — the fix touches only the fallback path used when no remembered choice applies.
Confirmed today via direct grep: the team-role check and its position ahead of the arbitrary first-entry fallback remain in Maestro's current `AuthContext` source, unmodified since the fix.
An explicit, code-level acknowledgment that this is the same defect class as a prior, separate fix in Centriu Link's own authentication context — found independently here because the two implementations do not share code.
The exact scenario the incident described (illustrative, matching the real report's shape without naming the individual)
A staff admin at one organization is also, separately, a registered client-portal contact at a different, older organization they were once associated with. Before the fix, opening the application with no remembered organization from a previous session landed them on whichever of the two happened to be first in an unordered list — in the reported case, the older client organization, with a client's own limited view rather than their real staff access. After the fix, the same person lands on the organization where they hold a genuine team role, by design rather than by list order.
What changes operationally
A person who belongs to more than one Centriu Maestro organization under different kinds of role — most commonly staff who are also a client-portal contact elsewhere — now opens the application on an organization matching their actual working role by default, the first time and every time their remembered choice doesn't apply, rather than on whichever organization happened to be returned first.
When this is not the right fit
This fix addresses which organization opens by DEFAULT when more than one applies — it does not change what a person can see or do once they've switched to a different organization through the product's own organization switcher, which remains under the platform's existing access controls. It is also specific to Centriu Maestro's own authentication context; a similar-sounding issue in a different Centriu product runs on independent code and is not affected by this fix.
An unordered fallback vs. a stated preference
Falling back to "the first item in the list" when no explicit choice has been made looks harmless because it always returns something valid — every organization in the list is one the person genuinely belongs to. The gap only becomes visible for a person who belongs to organizations under meaningfully different roles, where "first in the list" and "the one they actually work at" are not the same thing. Centriu Maestro's fix replaces that arbitrary order with a stated, checked preference for a genuine team role.
Related systems
Main system: Centriu Maestro.
What it does NOT do
- Does not change the already-correct behavior for a person with a single organization, or for a returning user whose remembered choice still applies — the fix touches only the unordered fallback path.
- Does not distinguish between different KINDS of team role — any role other than client or client-contact is treated equally for this specific preference.
- Does not change what a person can see or do after manually switching organizations through the product's own switcher — that remains governed by the platform's existing, separate access controls.
- Does not assume a fix made in a different Centriu product automatically applies here — Centriu Link's own equivalent fix runs on entirely separate code and required an independent fix in Maestro.
- Does not silently discard a person's remembered organization choice — that check still runs first, unchanged, and only falls through to the team-role preference when it finds nothing.
- Does not claim this eliminates every possible multi-organization edge case — it closes the specific, reported scenario of a team role competing with a client-portal role in an unordered fallback.
Security and governance
Which organization a multi-organization member lands on by default now prefers a genuine team-role membership over a client-portal role once any remembered-choice check finds nothing to use — closing a real, dated incident where the wrong default silently exposed the wrong organization's view. Any personal or business data involved remains subject to Brazil's LGPD (Law No. 13,709/2018). Full detail on access control lives at /governanca and /iso.
Pricing and contracting
Available by monthly subscription, with tiered plans. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).
Frequently asked questions
What exactly happened in the incident that led to this fix?
A staff admin who was also a client-portal contact on a separate, older organization had the application open silently on that older, client-role organization instead of the one they actually worked at, with no on-screen explanation.
Why didn't the "remembered organization" feature prevent this?
That check only helps once a person has a previous, still-valid remembered choice. The gap was specifically in the fallback used when no remembered choice applies — which had no preference at all for a genuine team role.
Is this the same bug as one already fixed in a different Centriu product?
It is the same defect CLASS, named as such directly in the fix's own commit — but Centriu Link's earlier fix runs on entirely separate code and could not have protected Maestro, which required its own independent fix.
Does this affect someone who only belongs to one organization?
No — the fix only changes the fallback used when more than one organization applies and no remembered choice exists; a single-organization member's experience is unaffected.
Can a person still manually switch to a different organization they belong to?
Yes — this fix is only about which organization opens by default; manually switching organizations through the product's own switcher works as before, under the platform's existing access controls.
What does Centriu Maestro cost?
It is sold by subscription with a published starting price — exact current values are on the central pricing page.
See how Centriu Maestro resolves which organization opens by default
Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.