From 225443469291605b839c8fa89a1605dae326dba7 Mon Sep 17 00:00:00 2001 From: Miguel Cabrerizo <30386061+doncicuto@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:00:47 +0200 Subject: [PATCH] fix: remove email validation for SearchUsers v2beta/users (#7855) fix: remove email validation + homogeneous requirements --- proto/zitadel/member.proto | 2 +- proto/zitadel/user.proto | 2 +- proto/zitadel/user/v2beta/query.proto | 5 ++--- proto/zitadel/user/v3alpha/query.proto | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/proto/zitadel/member.proto b/proto/zitadel/member.proto index 940ffcd5a2..07091e195e 100644 --- a/proto/zitadel/member.proto +++ b/proto/zitadel/member.proto @@ -112,7 +112,7 @@ message EmailQuery { string email = 1 [ (validate.rules).string = {max_len: 200}, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)" + description: "email address of the user" max_length: 200; example: "\"gigi@zitadel.com\""; } diff --git a/proto/zitadel/user.proto b/proto/zitadel/user.proto index 4991ca4903..c38f4f78af 100644 --- a/proto/zitadel/user.proto +++ b/proto/zitadel/user.proto @@ -311,7 +311,7 @@ message EmailQuery { string email_address = 1 [ (validate.rules).string = {max_len: 200}, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)" + description: "email address of the user" max_length: 200; example: "\"gigi@zitadel.com\""; } diff --git a/proto/zitadel/user/v2beta/query.proto b/proto/zitadel/user/v2beta/query.proto index 5f42ad7c32..e339cdde71 100644 --- a/proto/zitadel/user/v2beta/query.proto +++ b/proto/zitadel/user/v2beta/query.proto @@ -168,11 +168,10 @@ message DisplayNameQuery { // Query for users with a specific email. message EmailQuery { string email_address = 1 [ - (validate.rules).string = {min_len: 1, max_len: 200, email: true}, + (validate.rules).string = {max_len: 200}, (google.api.field_behavior) = REQUIRED, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - description: "email address of the user. (spec: https://tools.ietf.org/html/rfc2822#section-3.4.1)" - min_length: 1; + description: "email address of the user" max_length: 200; example: "\"gigi@zitadel.com\""; } diff --git a/proto/zitadel/user/v3alpha/query.proto b/proto/zitadel/user/v3alpha/query.proto index aa0fffbd91..6be060b0b1 100644 --- a/proto/zitadel/user/v3alpha/query.proto +++ b/proto/zitadel/user/v3alpha/query.proto @@ -122,10 +122,10 @@ message UsernameQuery { message EmailQuery { // Defines the email of the user to query for. string address = 1 [ - (validate.rules).string = {min_len: 1, max_len: 200}, + (validate.rules).string = {max_len: 200}, (google.api.field_behavior) = REQUIRED, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - min_length: 1; + description: "email address of the user" max_length: 200; example: "\"gigi@zitadel.com\""; }