Repository navigation
Closed
Labels
Description
Problem
Since #4903, a session minted for one organization (trustedOrganizationId, for example a trusted-header or SSO sign-in) can only use that organization. Every other organization's routes refuse it with 403 ORG_FORBIDDEN and the message "This session is limited to the organization that signed you in." The dashboard reads that refusal as "You're not a member of this workspace", which is wrong for someone who is a member. Paths at main 715dc15ad, under services/platform/.
- Server:
backend/auth/org.ts:63-74(requireOrgMember) andbackend/domains/organizations/routes.ts(/:id,/:id/*) answerORG_FORBIDDENwithSESSION_ORGANIZATION_MESSAGEwhensessionAllowsOrganizationfails. - Client:
app/lib/backend/org.ts:131maps anyORG_FORBIDDENfrom/members/meto{ status: 'not_member' }.app/routes/dashboard/$id.tsx:291then showsaccessDenied.noMembership: "You're not a member of this workspace. Contact an administrator for access." (de: "Du bist kein Mitglied dieses Arbeitsbereichs. …", fr: "Tu n'es pas membre de cet espace de travail. …"). - The right sentence already exists: fix(platform): bind organization session authority #4903 added
common.errors.organizationSessionRestricted("This session is limited to the organization that signed you in.").app/lib/auth/auth-client-error.tsrecognizes the refusal by code and message, but only the 2FA and passkey dialogs use it. - When it happens: someone who belongs to workspaces A and B signs in through A's single sign-on and then opens a link into B: a bookmark, a task link from an email or chat, or browser history. They're told they aren't a member and should contact an administrator. The fix on their side is to sign in to B differently, which nothing says. The organization switcher now lists only A (
organizations/routes.ts,GET /), so B also disappears from the menu without explanation.
Expected
- Recognize the session-restricted refusal (
ORG_FORBIDDENplusSESSION_ORGANIZATION_MESSAGE, asauthSessionRefusalMessagedoes) in the member-context read. Give it its own state that showsorganizationSessionRestricted, with a way to sign out and sign in to this workspace. Keepnot_memberfor real non-members. - Consider one line in the switcher or account menu saying this session only covers the organization it signed in to.
Regression: a dashboard layout test where /members/me rejects with 403 { code: 'ORG_FORBIDDEN', message: SESSION_ORGANIZATION_MESSAGE }. The restricted-session message shows, not noMembership. On 715dc15ad it shows noMembership.
Severity and owner
- Severity: medium-low. It is a misleading dead end for members of more than one organization who use single sign-on. It's new with fix(platform): bind organization session authority #4903, merged 2026-10-12 23:43Z and not yet released.
- Owner: platform (auth session authority, dashboard shell).
- Found by: Review A (TALE-358), 2026-10-13 04:15 Zurich occurrence, changed-cell review of fix(platform): bind organization session authority #4903. This is static reading at
715dc15ad; I didn't run it, because Review A's stack is BLOCKED.
Activity
fix(platform): tell a bound session apart from a non-member
test(platform): prove a single sign-on session keeps Log out
test(platform): prove a single sign-on session keeps Log out
test(platform): prove a single sign-on session keeps Log out