Skip to content

Commit 1de442d

Browse files
author
Andrew Farries
committed
Remove get/setUsageLimitForTeam methods
1 parent e89140f commit 1de442d

File tree

4 files changed

+0
-22
lines changed

4 files changed

+0
-22
lines changed

components/gitpod-protocol/src/gitpod-service.ts

-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,6 @@ export interface GitpodServer extends JsonRpcServer<GitpodClient>, AdminServer,
292292
getStripePortalUrl(attributionId: string): Promise<string>;
293293
getUsageLimit(attributionId: string): Promise<number | undefined>;
294294
setUsageLimit(attributionId: string, usageLimit: number): Promise<void>;
295-
getUsageLimitForTeam(teamId: string): Promise<number | undefined>;
296-
setUsageLimitForTeam(teamId: string, spendingLimit: number): Promise<void>;
297295

298296
listUsage(req: ListUsageRequest): Promise<ListUsageResponse>;
299297

components/server/ee/src/workspace/gitpod-server-impl.ts

-11
Original file line numberDiff line numberDiff line change
@@ -2254,17 +2254,6 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
22542254
});
22552255
}
22562256

2257-
async getUsageLimitForTeam(ctx: TraceContext, teamId: string): Promise<number | undefined> {
2258-
const attributionId: AttributionId = { kind: "team", teamId: teamId };
2259-
2260-
return this.getUsageLimit(ctx, AttributionId.render(attributionId));
2261-
}
2262-
2263-
async setUsageLimitForTeam(ctx: TraceContext, teamId: string, usageLimit: number): Promise<void> {
2264-
const attributionId: AttributionId = { kind: "team", teamId: teamId };
2265-
return this.setUsageLimit(ctx, AttributionId.render(attributionId), usageLimit);
2266-
}
2267-
22682257
async getNotifications(ctx: TraceContext): Promise<string[]> {
22692258
const result = await super.getNotifications(ctx);
22702259
const user = this.checkAndBlockUser("getNotifications");

components/server/src/auth/rate-limiter.ts

-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ const defaultFunctions: FunctionsConfig = {
218218
setUsageAttribution: { group: "default", points: 1 },
219219
getUsageLimit: { group: "default", points: 1 },
220220
setUsageLimit: { group: "default", points: 1 },
221-
getUsageLimitForTeam: { group: "default", points: 1 },
222-
setUsageLimitForTeam: { group: "default", points: 1 },
223221
getNotifications: { group: "default", points: 1 },
224222
getSupportedWorkspaceClasses: { group: "default", points: 1 },
225223
};

components/server/src/workspace/gitpod-server-impl.ts

-7
Original file line numberDiff line numberDiff line change
@@ -3156,13 +3156,6 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
31563156
throw new ResponseError(ErrorCodes.SAAS_FEATURE, `Not implemented in this version`);
31573157
}
31583158

3159-
async getUsageLimitForTeam(ctx: TraceContext, teamId: string): Promise<number | undefined> {
3160-
throw new ResponseError(ErrorCodes.SAAS_FEATURE, `Not implemented in this version`);
3161-
}
3162-
async setUsageLimitForTeam(ctx: TraceContext, teamId: string, spendingLimit: number): Promise<void> {
3163-
throw new ResponseError(ErrorCodes.SAAS_FEATURE, `Not implemented in this version`);
3164-
}
3165-
31663159
async setUsageAttribution(ctx: TraceContext, usageAttributionId: string): Promise<void> {
31673160
const user = this.checkAndBlockUser("setUsageAttribution");
31683161
try {

0 commit comments

Comments
 (0)