Skip to content

Commit 8a78d1f

Browse files
Laurie T. Malauroboquat
authored andcommitted
[usage] Only show team owners
1 parent d23450f commit 8a78d1f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,7 +2256,8 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
22562256
const billingMode = await this.billingModes.getBillingModeForUser(user, new Date());
22572257
if (billingMode.mode === "usage-based") {
22582258
const limit = await this.billingService.checkUsageLimitReached(user);
2259-
let teamOrUser;
2259+
await this.guardCostCenterAccess(ctx, user.id, limit.attributionId, "get");
2260+
22602261
switch (limit.attributionId.kind) {
22612262
case "user": {
22622263
if (limit.reached) {
@@ -2267,7 +2268,7 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
22672268
break;
22682269
}
22692270
case "team": {
2270-
teamOrUser = await this.teamDB.findTeamById(limit.attributionId.teamId);
2271+
const teamOrUser = await this.teamDB.findTeamById(limit.attributionId.teamId);
22712272
if (teamOrUser) {
22722273
if (limit.reached) {
22732274
result.push(teamOrUser?.slug);

0 commit comments

Comments
 (0)