diff --git a/docs/docs/apis/proto/system.md b/docs/docs/apis/proto/system.md index f7df28f019..981ce02dc4 100644 --- a/docs/docs/apis/proto/system.md +++ b/docs/docs/apis/proto/system.md @@ -49,7 +49,8 @@ Returns the detail of an instance > **rpc** AddInstance([AddInstanceRequest](#addinstancerequest)) [AddInstanceResponse](#addinstanceresponse) -deprecated: Creates a new instance with all needed setup data +Deprecated: Use CreateInstance instead +Creates a new instance with all needed setup data This might take some time @@ -377,7 +378,7 @@ This is an empty response | Field | Type | Description | Validation | | ----- | ---- | ----------- | ----------- | -| email | string | - | string.min_len: 1
string.max_len: 200
| +| email | string | - | string.min_len: 1
string.max_len: 200
string.email: true
| | is_email_verified | bool | - | | @@ -389,10 +390,10 @@ This is an empty response | Field | Type | Description | Validation | | ----- | ---- | ----------- | ----------- | +| user_name | string | - | string.max_len: 200
| | email | CreateInstanceRequest.Email | - | message.required: true
| | profile | CreateInstanceRequest.Profile | - | message.required: false
| | password | CreateInstanceRequest.Password | - | message.required: false
| -| user_name | string | - | string.max_len: 200
| diff --git a/internal/command/user_machine_test.go b/internal/command/user_machine_test.go index 383bd2e941..90dc648f46 100644 --- a/internal/command/user_machine_test.go +++ b/internal/command/user_machine_test.go @@ -271,16 +271,6 @@ func TestCommandSide_ChangeMachine(t *testing.T) { ), ), ), - expectFilter( - eventFromEventPusher( - org.NewDomainPolicyAddedEvent(context.Background(), - &user.NewAggregate("user1", "org1").Aggregate, - true, - true, - true, - ), - ), - ), ), }, args: args{ @@ -315,16 +305,6 @@ func TestCommandSide_ChangeMachine(t *testing.T) { ), ), ), - expectFilter( - eventFromEventPusher( - org.NewDomainPolicyAddedEvent(context.Background(), - &user.NewAggregate("user1", "org1").Aggregate, - true, - true, - true, - ), - ), - ), expectPush( []*repository.Event{ eventFromEventPusher( diff --git a/proto/zitadel/system.proto b/proto/zitadel/system.proto index c37ad5c0cc..9bc7f16964 100644 --- a/proto/zitadel/system.proto +++ b/proto/zitadel/system.proto @@ -122,7 +122,8 @@ service SystemService { }; } - //deprecated: Creates a new instance with all needed setup data + // Deprecated: Use CreateInstance instead + // Creates a new instance with all needed setup data // This might take some time rpc AddInstance(AddInstanceRequest) returns (AddInstanceResponse) { option (google.api.http) = { @@ -430,7 +431,7 @@ message CreateInstanceRequest { string preferred_language = 5 [(validate.rules).string = {max_len: 10}]; } message Email { - string email = 1[(validate.rules).string = {min_len: 1, max_len: 200}]; + string email = 1[(validate.rules).string = {min_len: 1, max_len: 200, email: true}]; bool is_email_verified = 2; } message Password { @@ -438,10 +439,10 @@ message CreateInstanceRequest { bool password_change_required = 2; } message Human { - Email email = 1 [(validate.rules).message.required = true]; - Profile profile = 2 [(validate.rules).message.required = false]; - Password password = 3 [(validate.rules).message.required = false]; - string user_name = 4 [(validate.rules).string = {max_len: 200}]; + string user_name = 1 [(validate.rules).string = {max_len: 200}]; + Email email = 2 [(validate.rules).message.required = true]; + Profile profile = 3 [(validate.rules).message.required = false]; + Password password = 4 [(validate.rules).message.required = false]; } message PersonalAccessToken { google.protobuf.Timestamp expiration_date = 1 [