Skip to content

Filter by organizationId in ListWorkspaces #18402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/gitpod-protocol/go/gitpod-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1490,9 +1490,10 @@ type UserInfo struct {

// GetWorkspacesOptions is the GetWorkspacesOptions message type
type GetWorkspacesOptions struct {
Limit float64 `json:"limit,omitempty"`
PinnedOnly bool `json:"pinnedOnly,omitempty"`
SearchString string `json:"searchString,omitempty"`
Limit float64 `json:"limit,omitempty"`
SearchString string `json:"searchString,omitempty"`
PinnedOnly bool `json:"pinnedOnly,omitempty"`
OrganizationId string `json:"organizationId,omitempty"`
}

// StartWorkspaceResult is the StartWorkspaceResult message type
Expand Down
3 changes: 2 additions & 1 deletion components/public-api-server/pkg/apiv1/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ func (s *WorkspaceService) ListWorkspaces(ctx context.Context, req *connect.Requ
return nil, err
}
serverResp, err := conn.GetWorkspaces(ctx, &protocol.GetWorkspacesOptions{
Limit: float64(limit),
Limit: float64(limit),
OrganizationId: req.Msg.GetOrganizationId(),
})
if err != nil {
return nil, proxy.ConvertError(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ service WorkspacesService {
message ListWorkspacesRequest {
Pagination pagination = 1;
google.protobuf.FieldMask field_mask = 2;
string organization_id = 3;
}
message ListWorkspacesResponse {
string next_page_token = 1;
Expand Down
Loading