feat(web): disable member invites for child organizations#4257
Merged
Conversation
Child organizations now manage membership through their parent organization, so direct invites into a child org are no longer allowed. - inviteUserToOrganization rejects child orgs; members.invite maps this to a PRECONDITION_FAILED with a user-facing message - acceptOrganizationInvite rejects redeeming any (including legacy) invitation into a child org - hide the Invite Member button for child orgs in OrganizationMembersCard - update tests to encode the new behavior
eshurakov
approved these changes
Jun 25, 2026
marius-kilocode
approved these changes
Jun 25, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous Review Summary (commit b826308)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b826308)Status: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by gpt-5.4-20260305 · Input: 37K · Output: 4K · Cached: 180K Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Child organizations now manage membership exclusively through their parent organization. This disables the self-serve invite flow for child orgs (orgs where
parent_organization_id IS NOT NULL) in both the backend and the UI.Changes
inviteUserToOrganizationrejects child orgs (Child organizations cannot invite members). Theorganizations.members.invitetRPC handler maps this toPRECONDITION_FAILEDwith a user-facing message: "Child organizations manage membership through their parent organization."acceptOrganizationInviterejects redeeming any invitation (including pre-existing/legacy ones) into a child org, so no membership can be created that way.OrganizationMembersCard(thewithMembersquery already returnsparent_organization_id).Scope / decisions
resolveAuthorityForNormalizedDomaintreats a child-owned domain asconflicting_child_policy), so SSO auto-join always targets the parent/standalone org — never a child.admin.addMember), the Stripe seat webhook owner re-add, OSS sponsorship onboarding, and org creation (creator-as-owner; orgs have no parent at creation).Tests
organizations.test.ts.PRECONDITION_FAILED.organizations.test.ts,organization-members-router.test.ts, andorganization-subscription-event.test.tsall green.