mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore!: allow CreateUser to accept multiple organizations (#14383)
* chore: allow CreateUser to accept multiple organizations In a multi-org deployment, it makes more sense to allow for multiple org memberships to be assigned at create. The legacy param will still be honored. * Handle sdk deprecation better by maintaining cli functions
This commit is contained in:
@@ -717,7 +717,7 @@ func TestEnterpriseUserLogin(t *testing.T) {
|
||||
Name: customRole.Name,
|
||||
OrganizationID: owner.OrganizationID,
|
||||
},
|
||||
}, func(r *codersdk.CreateUserRequest) {
|
||||
}, func(r *codersdk.CreateUserRequestWithOrgs) {
|
||||
r.Password = "SomeSecurePassword!"
|
||||
r.UserLoginType = codersdk.LoginTypePassword
|
||||
})
|
||||
@@ -752,7 +752,7 @@ func TestEnterpriseUserLogin(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
anotherClient, anotherUser := coderdtest.CreateAnotherUserMutators(t, ownerClient, owner.OrganizationID, nil, func(r *codersdk.CreateUserRequest) {
|
||||
anotherClient, anotherUser := coderdtest.CreateAnotherUserMutators(t, ownerClient, owner.OrganizationID, nil, func(r *codersdk.CreateUserRequestWithOrgs) {
|
||||
r.Password = "SomeSecurePassword!"
|
||||
r.UserLoginType = codersdk.LoginTypePassword
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user