From 5350b91e584a2b6b0a8078ace7d9d9331e522238 Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Wed, 14 Sep 2022 06:36:18 +0000 Subject: [PATCH] Remove `ensureStripeApiIsAllowed` calls Also the `guardTeamOperation` call as both are not needed given the `guardCostCenterAccess` call below. --- components/server/ee/src/workspace/gitpod-server-impl.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/components/server/ee/src/workspace/gitpod-server-impl.ts b/components/server/ee/src/workspace/gitpod-server-impl.ts index 25f62cfbb3c1d9..fb1170761194a6 100644 --- a/components/server/ee/src/workspace/gitpod-server-impl.ts +++ b/components/server/ee/src/workspace/gitpod-server-impl.ts @@ -2245,15 +2245,6 @@ export class GitpodServerEEImpl extends GitpodServerImpl { } const user = this.checkAndBlockUser("setUsageLimit"); - switch (attrId.kind) { - case "team": - const team = await this.guardTeamOperation(attrId.teamId, "update"); - await this.ensureStripeApiIsAllowed({ team }); - break; - case "user": - await this.ensureStripeApiIsAllowed({ user }); - break; - } await this.guardCostCenterAccess(ctx, user.id, attrId, "update"); const response = await this.usageService.getCostCenter({ attributionId });