From a5ec9897fc9f126c14f278cb1be646d8b768bac6 Mon Sep 17 00:00:00 2001 From: Kush Sharma Date: Fri, 22 Sep 2023 21:16:32 +0530 Subject: [PATCH] feat(frontier): list project groups - List all groups which has viewer access to project - List organizations with user invitations - Role scopes Signed-off-by: Kush Sharma --- raystack/frontier/v1beta1/frontier.proto | 22 +++++++++++++++++++++- raystack/frontier/v1beta1/models.proto | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index 3cc4beec..e4af7573 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -864,7 +864,16 @@ service FrontierService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "Project"; summary: "List project serviceusers" - description: "Returns a collection of users of a project. Filter by user permissions is supported."; + description: "Returns a collection of users of a project."; + }; + } + + rpc ListProjectGroups(ListProjectGroupsRequest) returns (ListProjectGroupsResponse) { + option (google.api.http) = {get: "/v1beta1/projects/{id}/groups"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Project"; + summary: "List project groups" + description: "Returns a collection of groups of a project."; }; } @@ -1637,6 +1646,7 @@ message ListCurrentUserInvitationsRequest {} message ListCurrentUserInvitationsResponse { repeated Invitation invitations = 1; + repeated Organization orgs = 2; } // Serviceuser @@ -1803,6 +1813,7 @@ message UpdateOrganizationRoleResponse { message ListRolesRequest { string state = 1; + repeated string scopes = 2; } message ListRolesResponse { @@ -1812,6 +1823,7 @@ message ListRolesResponse { message ListOrganizationRolesRequest { string org_id = 1 [(validate.rules).string.min_len = 3]; string state = 2; + repeated string scopes = 3; } message ListOrganizationRolesResponse { @@ -2179,6 +2191,14 @@ message ListProjectServiceUsersResponse { repeated RolePair role_pairs = 2; } +message ListProjectGroupsRequest { + string id = 1 [(validate.rules).string.min_len = 3]; +} + +message ListProjectGroupsResponse { + repeated Group groups = 1; +} + message EnableProjectRequest { string id = 1; } diff --git a/raystack/frontier/v1beta1/models.proto b/raystack/frontier/v1beta1/models.proto index f4c31ce5..eca0ab88 100644 --- a/raystack/frontier/v1beta1/models.proto +++ b/raystack/frontier/v1beta1/models.proto @@ -111,6 +111,7 @@ message Role { }]; string org_id = 9; string state = 10; + repeated string scopes = 11; } message Organization { @@ -540,6 +541,7 @@ message RoleRequestBody { repeated string permissions = 3 [(validate.rules).repeated = {min_items: 1}]; google.protobuf.Struct metadata = 5; string title = 6; + repeated string scopes = 7; } message PreferenceRequestBody {