From 3bb63ea22deead93f9bee0f77c1f7a2fd9d0cdb2 Mon Sep 17 00:00:00 2001 From: Kush <3647166+kushsharma@users.noreply.github.com> Date: Sat, 23 Sep 2023 20:22:45 +0530 Subject: [PATCH] feat(frontier): list project groups (#310) - 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 {