fix: pass configured orgs to CreateUserParams in CreateAccount#134
fix: pass configured orgs to CreateUserParams in CreateAccount#134c1-dev-bot[bot] wants to merge 1 commit intomainfrom
Conversation
CreateAccount was calling getCreateUserParams(accountInfo) which only looked for "org" in the accountInfo profile map. The platform doesn't pass the org through the profile, so this always failed with "org is required" even when the connector had orgs configured. Now getCreateUserParams accepts the connector's configured orgs and falls back to configuredOrgs[0] when the profile doesn't include an org. Fixes: CXH-1257
|
Claude finished @c1-dev-bot[bot]'s task in 43s —— View job PR Review:
|
Summary
CreateAccountcalledgetCreateUserParams(accountInfo)which expectedorgin the account info profile map, but the platform doesn't pass it thereinvitationResourceType.orgs, butCreateAccountwasn't using themgetCreateUserParamsaccepts the connector's configured orgs and falls back toconfiguredOrgs[0]when the profile doesn't include an orgRoot Cause
In
pkg/connector/invitation.go,getCreateUserParams()only looked fororginaccountInfo.Profile.AsMap(). The platform does not populate the org in the account info profile during provisioning — the org is a connector-level configuration. Other methods likeDelete()correctly usedi.orgsfrom the struct, butCreateAccount()did not.Test Plan
go build ./...passesgo test ./...passesFixes: CXH-1257
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: