Changes
4 changed files (+32/-25)
-
-
@@ -54,13 +54,10 @@ },}), nil } // TODO: SystemError 以外にする if strings.Trim(name, " \r\n\t") != name { return connect.NewResponse(&workspaceV2.CreateInitialAdminResponse{ Result: &workspaceV2.CreateInitialAdminResponse_SystemError{ SystemError: &errorV1.SystemError{ Message: proto.String("Name cannot have heading or trailing spaces"), }, Result: &workspaceV2.CreateInitialAdminResponse_NameSurroundedBySpaces{ NameSurroundedBySpaces: "Name cannot contain space, CR, LF, Tab", }, }), nil }
-
@@ -81,13 +78,10 @@ },}), nil } // TODO: SystemError 以外にする if len(password) <= 8 { return connect.NewResponse(&workspaceV2.CreateInitialAdminResponse{ Result: &workspaceV2.CreateInitialAdminResponse_SystemError{ SystemError: &errorV1.SystemError{ Message: proto.String("Password has to be longer than or equals to 8 bytes"), }, Result: &workspaceV2.CreateInitialAdminResponse_PasswordLessThanBytes{ PasswordLessThanBytes: 8, }, }), nil }
-
@@ -171,12 +165,9 @@ }for _, u := range users.Projection.Users { if u.GetName() == name { // TODO: SystemError 以外にする return connect.NewResponse(&workspaceV2.CreateInitialAdminResponse{ Result: &workspaceV2.CreateInitialAdminResponse_SystemError{ SystemError: &errorV1.SystemError{ Message: proto.String("User with same name already exists."), }, Result: &workspaceV2.CreateInitialAdminResponse_DuplicatedName{ DuplicatedName: name, }, }), nil }
-
-
-
@@ -123,13 +123,10 @@ },}), nil } // TODO: SystemError 以外にする if strings.Trim(name, " \r\n\t") != name { return connect.NewResponse(&workspaceV2.CreateUserResponse{ Result: &workspaceV2.CreateUserResponse_SystemError{ SystemError: &errorV1.SystemError{ Message: proto.String("Name cannot have heading or trailing spaces"), }, Result: &workspaceV2.CreateUserResponse_NameSurroundedBySpaces{ NameSurroundedBySpaces: "Name cannot contain space, CR, LF, Tab", }, }), nil }
-
@@ -150,13 +147,10 @@ },}), nil } // TODO: SystemError 以外にする if len(password) <= 8 { return connect.NewResponse(&workspaceV2.CreateUserResponse{ Result: &workspaceV2.CreateUserResponse_SystemError{ SystemError: &errorV1.SystemError{ Message: proto.String("Password has to be longer than or equals to 8 bytes"), }, Result: &workspaceV2.CreateUserResponse_PasswordLessThanBytes{ PasswordLessThanBytes: 8, }, }), nil }
-
-
-
@@ -28,5 +28,16 @@ yamori.error.v1.AuthenticationError authentication_error = 4;// リクエストの必須フィールドが欠けている。 yamori.error.v1.MissingFieldError missing_field_error = 5; // 名前の前後に空白が入っている。 // 値は実装依存のデバッグメッセージ。 string name_surrounded_by_spaces = 6; // 同じ名前のユーザが既に登録されている。 // 値は重複している名前。 string duplicated_name = 7; // `password` フィールドのバイト数が指定の値未満である。 uint32 password_less_than_bytes = 8; } }
-
-
-
@@ -29,5 +29,16 @@ yamori.error.v1.MissingFieldError missing_field_error = 4;// 権限を持っていない。 yamori.error.v1.CapabilityError capability_error = 5; // 名前の前後に空白が入っている。 // 値は実装依存のデバッグメッセージ。 string name_surrounded_by_spaces = 6; // 同じ名前のユーザが既に登録されている。 // 値は重複している名前。 string duplicated_name = 7; // `password` フィールドのバイト数が指定の値未満である。 uint32 password_less_than_bytes = 8; } }
-