A returning member lands in whichever organization comes first and cannot reach the others #122

Open
opened 2026-09-21 07:18:36 +00:00 by cgalo5758 · 1 comment
Owner

The question

At sign-in the console binds the session to the first organization the person owns and then to that organization's first workspace. A person who is a member of an organization they do not own has no way to work in it: the membership exists in the database and appears on no surface. Is the positional binding the contract, or a placeholder that stands until a person can hold several memberships?

What depends on the answer

Whether a member ever sees more than one organization, and what a switcher would be: a control that changes the session's organization, or a separate context per tab or per URL. Everything that reads the session's organization, which is most member pages, depends on the shape chosen.

Options known so far

  • Keep one organization per session, chosen deterministically, and say so; memberships in other organizations stay records without a surface.
  • A switcher that rebinds the session, with the ordering rule replaced by a remembered last choice.
  • The organization in the URL, with the session holding only the person.

Decided when

The identity model states how a person with several memberships reaches each one, and the console's sign-in follows it rather than the first row it finds.

Migrated from status/issues.md at b7a0e15

## The question At sign-in the console binds the session to the first organization the person owns and then to that organization's first workspace. A person who is a member of an organization they do not own has no way to work in it: the membership exists in the database and appears on no surface. Is the positional binding the contract, or a placeholder that stands until a person can hold several memberships? ## What depends on the answer Whether a member ever sees more than one organization, and what a switcher would be: a control that changes the session's organization, or a separate context per tab or per URL. Everything that reads the session's organization, which is most member pages, depends on the shape chosen. ## Options known so far - Keep one organization per session, chosen deterministically, and say so; memberships in other organizations stay records without a surface. - A switcher that rebinds the session, with the ordering rule replaced by a remembered last choice. - The organization in the URL, with the session holding only the person. ## Decided when The identity model states how a person with several memberships reaches each one, and the console's sign-in follows it rather than the first row it finds. Migrated from status/issues.md at b7a0e15
cgalo5758 added the
kind
design
area/identity
labels 2026-09-21 07:18:36 +00:00
Author
Owner

Sign-in (CallbackHandler, internal/auth/auth.go) takes the first row of GetOrganizationsByOwner, then the first row of GetWorkspacesByOrgID. Both queries sort by name and ignore status, so a workspace created later whose name sorts first, or a deleted one, becomes the session's workspace at the next sign-in. The demo seed answers the same question another way: it picks the owned organization whose type is personal (internal/demoseed/demoseed.go).

Sign-in (`CallbackHandler`, `internal/auth/auth.go`) takes the first row of `GetOrganizationsByOwner`, then the first row of `GetWorkspacesByOrgID`. Both queries sort by name and ignore status, so a workspace created later whose name sorts first, or a deleted one, becomes the session's workspace at the next sign-in. The demo seed answers the same question another way: it picks the owned organization whose type is `personal` (`internal/demoseed/demoseed.go`).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#122