mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
feat: all project grant search query (#2581)
* feat: all project grant search query * feat: all project grant search query
This commit is contained in:
@@ -1437,6 +1437,19 @@ service ManagementService {
|
||||
};
|
||||
}
|
||||
|
||||
// Returns all project grants matching the query, (ProjectGrant = Grant another organisation for my project)
|
||||
// Limit should always be set, there is a default limit set by the service
|
||||
rpc ListAllProjectGrants(ListAllProjectGrantsRequest) returns (ListAllProjectGrantsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/projectgrants/_search"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "project.grant.read"
|
||||
};
|
||||
}
|
||||
|
||||
// Add a new project grant (ProjectGrant = Grant another organisation for my project)
|
||||
// Project Grant will be listed in granted project of the other organisation
|
||||
rpc AddProjectGrant(AddProjectGrantRequest) returns (AddProjectGrantResponse) {
|
||||
@@ -4027,6 +4040,18 @@ message ListProjectGrantsResponse {
|
||||
repeated zitadel.project.v1.GrantedProject result = 2;
|
||||
}
|
||||
|
||||
message ListAllProjectGrantsRequest {
|
||||
//list limitations and ordering
|
||||
zitadel.v1.ListQuery query = 1;
|
||||
//criterias the client is looking for
|
||||
repeated zitadel.project.v1.AllProjectGrantQuery queries = 2;
|
||||
}
|
||||
|
||||
message ListAllProjectGrantsResponse {
|
||||
zitadel.v1.ListDetails details = 1;
|
||||
repeated zitadel.project.v1.GrantedProject result = 2;
|
||||
}
|
||||
|
||||
message AddProjectGrantRequest {
|
||||
string project_id = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
||||
string granted_org_id = 2 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
||||
|
@@ -204,6 +204,17 @@ message ProjectGrantQuery {
|
||||
}
|
||||
}
|
||||
|
||||
message AllProjectGrantQuery {
|
||||
oneof query {
|
||||
option (validate.required) = true;
|
||||
|
||||
GrantProjectNameQuery project_name_query = 1;
|
||||
GrantRoleKeyQuery role_key_query = 2;
|
||||
ProjectIDQuery project_id_query = 3;
|
||||
GrantedOrgIDQuery granted_org_id_query = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message GrantProjectNameQuery {
|
||||
string name = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
@@ -232,4 +243,22 @@ message GrantRoleKeyQuery {
|
||||
description: "defines which text equality method is used"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectIDQuery {
|
||||
string project_id = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message GrantedOrgIDQuery {
|
||||
string granted_org_id = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user