Problem
DEFAULT_CONNECTIONS and DEFAULT_SOURCES are applied when password registration creates a new team, but not when the first user accepts an invite to an already-created empty team.
That leaves the invited team without its configured default connection and sources. Deployments that bootstrap a team and invite before the first user joins must either mutate MongoDB directly or leave source setup to a user.
Expected behavior
After invite-based user registration succeeds, call setupTeamDefaults(teamInvite.teamId) with the same non-fatal error handling used by password registration.
The existing helper already preserves configured teams by skipping connection or source creation when those objects exist.
Reproduction
- Configure
DEFAULT_CONNECTIONS and DEFAULT_SOURCES.
- Create an empty team and a valid invite for it.
- Accept the invite through
POST /team/setup/:token.
- Observe that the user is created, but the configured connection and sources are not.
Suggested coverage
- An invited empty team receives its configured defaults.
- An invited team with existing sources is not overwritten.
- Default provisioning failure does not prevent the user from joining.
Problem
DEFAULT_CONNECTIONSandDEFAULT_SOURCESare applied when password registration creates a new team, but not when the first user accepts an invite to an already-created empty team.That leaves the invited team without its configured default connection and sources. Deployments that bootstrap a team and invite before the first user joins must either mutate MongoDB directly or leave source setup to a user.
Expected behavior
After invite-based user registration succeeds, call
setupTeamDefaults(teamInvite.teamId)with the same non-fatal error handling used by password registration.The existing helper already preserves configured teams by skipping connection or source creation when those objects exist.
Reproduction
DEFAULT_CONNECTIONSandDEFAULT_SOURCES.POST /team/setup/:token.Suggested coverage