MCPcopy
hub / github.com/coder/mux / isWorkspaceOwnedBy

Method isWorkspaceOwnedBy

src/node/services/taskHandleStore.ts:212–217  ·  view source on GitHub ↗
(ownerWorkspaceId: string, workspaceId: string)

Source from the content-addressed store, hash-verified

210 }
211
212 async isWorkspaceOwnedBy(ownerWorkspaceId: string, workspaceId: string): Promise<boolean> {
213 assert(ownerWorkspaceId.trim().length > 0, "isWorkspaceOwnedBy requires ownerWorkspaceId");
214 assert(workspaceId.trim().length > 0, "isWorkspaceOwnedBy requires workspaceId");
215 const records = await this.listWorkspaceTurns(ownerWorkspaceId);
216 return records.some((record) => record.createdWorkspace && record.workspaceId === workspaceId);
217 }
218
219 private getOwnerHandleDir(ownerWorkspaceId: string): string {
220 assert(ownerWorkspaceId.trim().length > 0, "ownerWorkspaceId must be non-empty");

Calls 2

listWorkspaceTurnsMethod · 0.95
assertFunction · 0.50

Tested by

no test coverage detected