Skip to content

Commit

Permalink
Remove ensureStripeApiIsAllowed calls
Browse files Browse the repository at this point in the history
Also the `guardTeamOperation` call as both are not needed given the
`guardCostCenterAccess` call below.
  • Loading branch information
Andrew Farries authored and roboquat committed Sep 14, 2022
1 parent 743dcf7 commit 5350b91
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/server/ee/src/workspace/gitpod-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 5350b91

Please sign in to comment.