D104 · An invitation reaches only a login with no membership anywhere
Proposed · 2026-11-19 · zuki, in the team session on #650; it binds when this page's pull request is merged · Applies to access (ACC) · Partly supersedes D101: an email whose login is a member of another organization stays refused
Decision: invite_member() accepts an email with an existing login only when that login has no membership in any organization: a removed member, or a login moved from v1 that holds no membership. An email whose login has a membership in another organization is refused, as R-ACC-92 refused it before D101. Everything else D101 decides stands: the sign-in link, its 24 hours, accept_invitation() and its recheck, and no /welcome.
Why: D101 was written to bring a removed member back. Its wording, "an email whose login has none there", also lets one login belong to two organizations. The pool switcher, getCurrentPool, the current organization and the per-organization RLS have never been tested with that, and no organization has asked for it. Keeping the old refusal holds the slice to D101's purpose.
Consequences:
- R-ACC-92 refuses an email whose login has a membership in any organization, with invitation.login_exists as now. Its note that joining another organization waits for a real case stays.
- A login in two organizations needs its own decision when a real case comes.