faet: add usermemberships request to auth api (#2139)

This commit is contained in:
Fabi
2021-08-06 15:04:49 +02:00
committed by GitHub
parent c9290dc1a5
commit ae50f57c2c
6 changed files with 109 additions and 2 deletions

View File

@@ -534,6 +534,19 @@ service AuthService {
permission: "authenticated"
};
}
// Show all the permissions my user has in ZITADEL (ZITADEL Manager)
// Limit should always be set, there is a default limit set by the service
rpc ListMyMemberships(ListMyMembershipsRequest) returns (ListMyMembershipsResponse) {
option (google.api.http) = {
post: "/memberships/me/_search"
body: "*"
};
option (zitadel.v1.auth_option) = {
permission: "authenticated"
};
}
}
//This is an empty request
@@ -895,4 +908,16 @@ message ListMyProjectPermissionsRequest {}
message ListMyProjectPermissionsResponse {
repeated string result = 1;
}
}
message ListMyMembershipsRequest {
//the field the result is sorted
zitadel.v1.ListQuery query = 1;
//criterias the client is looking for
repeated zitadel.user.v1.MembershipQuery queries = 2;
}
message ListMyMembershipsResponse {
zitadel.v1.ListDetails details = 1;
repeated zitadel.user.v1.Membership result = 2;
}