Skip to content

Commit c5059f2

Browse files
Filter by organizationId in ListWorkspaces (#18402)
Remove `IncludeWithoutProject`
1 parent 0d22d83 commit c5059f2

File tree

5 files changed

+347
-328
lines changed

5 files changed

+347
-328
lines changed

components/gitpod-protocol/go/gitpod-service.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,9 +1490,10 @@ type UserInfo struct {
14901490

14911491
// GetWorkspacesOptions is the GetWorkspacesOptions message type
14921492
type GetWorkspacesOptions struct {
1493-
Limit float64 `json:"limit,omitempty"`
1494-
PinnedOnly bool `json:"pinnedOnly,omitempty"`
1495-
SearchString string `json:"searchString,omitempty"`
1493+
Limit float64 `json:"limit,omitempty"`
1494+
SearchString string `json:"searchString,omitempty"`
1495+
PinnedOnly bool `json:"pinnedOnly,omitempty"`
1496+
OrganizationId string `json:"organizationId,omitempty"`
14961497
}
14971498

14981499
// StartWorkspaceResult is the StartWorkspaceResult message type

components/public-api-server/pkg/apiv1/workspace.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ func (s *WorkspaceService) ListWorkspaces(ctx context.Context, req *connect.Requ
140140
return nil, err
141141
}
142142
serverResp, err := conn.GetWorkspaces(ctx, &protocol.GetWorkspacesOptions{
143-
Limit: float64(limit),
143+
Limit: float64(limit),
144+
OrganizationId: req.Msg.GetOrganizationId(),
144145
})
145146
if err != nil {
146147
return nil, proxy.ConvertError(err)

components/public-api/gitpod/experimental/v1/workspaces.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ service WorkspacesService {
4545
message ListWorkspacesRequest {
4646
Pagination pagination = 1;
4747
google.protobuf.FieldMask field_mask = 2;
48+
string organization_id = 3;
4849
}
4950
message ListWorkspacesResponse {
5051
string next_page_token = 1;

0 commit comments

Comments
 (0)