diff --git a/docs/docs/apis/proto/project.md b/docs/docs/apis/proto/project.md index 48066cd951..0468a98b43 100644 --- a/docs/docs/apis/proto/project.md +++ b/docs/docs/apis/proto/project.md @@ -102,6 +102,18 @@ title: zitadel/project.proto | Field | Type | Description | Validation | | ----- | ---- | ----------- | ----------- | | [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.name_query | ProjectNameQuery | - | | +| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.project_resource_owner_query | ProjectResourceOwnerQuery | - | | + + + + +### ProjectResourceOwnerQuery + + + +| Field | Type | Description | Validation | +| ----- | ---- | ----------- | ----------- | +| resource_owner | string | - | string.max_len: 200
| diff --git a/internal/api/grpc/project/converter.go b/internal/api/grpc/project/converter.go index e3490dfc15..80b6a4e8b3 100644 --- a/internal/api/grpc/project/converter.go +++ b/internal/api/grpc/project/converter.go @@ -68,6 +68,8 @@ func ProjectQueryToModel(apiQuery *proj_pb.ProjectQuery) (query.SearchQuery, err switch q := apiQuery.Query.(type) { case *proj_pb.ProjectQuery_NameQuery: return query.NewProjectNameSearchQuery(object.TextMethodToQuery(q.NameQuery.Method), q.NameQuery.Name) + case *proj_pb.ProjectQuery_ProjectResourceOwnerQuery: + return query.NewProjectResourceOwnerSearchQuery(q.ProjectResourceOwnerQuery.ResourceOwner) default: return nil, errors.ThrowInvalidArgument(nil, "ORG-vR9nC", "List.Query.Invalid") } diff --git a/proto/zitadel/project.proto b/proto/zitadel/project.proto index 4ae408b0b6..fbf4ee2d62 100644 --- a/proto/zitadel/project.proto +++ b/proto/zitadel/project.proto @@ -61,7 +61,7 @@ message GrantedProject { description: "current state of the project grant"; } ]; - + string project_id = 6 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { example: "\"69629023906488334\"" @@ -109,6 +109,7 @@ message ProjectQuery { option (validate.required) = true; ProjectNameQuery name_query = 1; + ProjectResourceOwnerQuery project_resource_owner_query = 2; } } @@ -127,6 +128,15 @@ message ProjectNameQuery { ]; } +message ProjectResourceOwnerQuery { + string resource_owner = 1 [ + (validate.rules).string = {max_len: 200}, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "\"69629023906488334\"" + } + ]; +} + message Role { string key = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {