Skip to content

Commit a1232a0

Browse files
committed
Disable all the broken stuff
1 parent e745ae1 commit a1232a0

File tree

3 files changed

+30
-192
lines changed

3 files changed

+30
-192
lines changed

components/server/ee/src/user/user-service.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55
*/
66

77
import { UserService, CheckSignUpParams, CheckTermsParams } from "../../../src/user/user-service";
8-
import { User, WorkspaceTimeoutDuration, WORKSPACE_TIMEOUT_EXTENDED, WORKSPACE_TIMEOUT_EXTENDED_ALT, WORKSPACE_TIMEOUT_DEFAULT_LONG, WORKSPACE_TIMEOUT_DEFAULT_SHORT } from "@gitpod/gitpod-protocol";
8+
import {
9+
User,
10+
WorkspaceTimeoutDuration,
11+
WORKSPACE_TIMEOUT_EXTENDED,
12+
WORKSPACE_TIMEOUT_EXTENDED_ALT,
13+
WORKSPACE_TIMEOUT_DEFAULT_LONG,
14+
WORKSPACE_TIMEOUT_DEFAULT_SHORT,
15+
} from "@gitpod/gitpod-protocol";
916
import { inject } from "inversify";
1017
import { LicenseEvaluator } from "@gitpod/licensor/lib";
1118
import { Feature } from "@gitpod/licensor/lib/api";
12-
import { AuthException } from "../../../src/auth/errors";
19+
//import { AuthException } from "../../../src/auth/errors";
1320
import { EligibilityService } from "./eligibility-service";
1421
import { SubscriptionService } from "@gitpod/gitpod-payment-endpoint/lib/accounting";
1522
import { OssAllowListDB } from "@gitpod/gitpod-db/lib/oss-allowlist-db";
@@ -75,16 +82,14 @@ export class UserServiceEE extends UserService {
7582

7683
async checkSignUp(params: CheckSignUpParams) {
7784
// todo@at: check if we need an optimization for SaaS here. used to be a no-op there.
78-
7985
// 1. check the license
80-
const userCount = await this.userDb.getUserCount(true);
81-
if (!this.licenseEvaluator.hasEnoughSeats(userCount)) {
82-
const msg = `Maximum number of users permitted by the license exceeded`;
83-
throw AuthException.create("Cannot sign up", msg, { userCount, params });
84-
}
85-
86-
// 2. check defaults
87-
await super.checkSignUp(params);
86+
// const userCount = await this.userDb.getUserCount(true);
87+
// if (!this.licenseEvaluator.hasEnoughSeats(userCount)) {
88+
// const msg = `Maximum number of users permitted by the license exceeded`;
89+
// throw AuthException.create("Cannot sign up", msg, { userCount, params });
90+
// }
91+
// // 2. check defaults
92+
// await super.checkSignUp(params);
8893
}
8994

9095
async checkTermsAcceptanceRequired(params: CheckTermsParams): Promise<boolean> {

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,20 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
269269
}
270270

271271
async validateLicense(ctx: TraceContext): Promise<LicenseValidationResult> {
272-
const v = this.licenseEvaluator.validate();
273-
if (!v.valid) {
274-
return v;
275-
}
276-
277-
const userCount = await this.userDB.getUserCount(true);
278-
const canAnotherUserSignUp = this.licenseEvaluator.hasEnoughSeats(userCount + 1);
279-
if (!canAnotherUserSignUp) {
280-
return {
281-
valid: true,
282-
issue: "seats-exhausted",
283-
msg: "maximum number of users reached",
284-
};
285-
}
272+
// const v = this.licenseEvaluator.validate();
273+
// if (!v.valid) {
274+
// return v;
275+
// }
276+
277+
// const userCount = await this.userDB.getUserCount(true);
278+
// const canAnotherUserSignUp = this.licenseEvaluator.hasEnoughSeats(userCount + 1);
279+
// if (!canAnotherUserSignUp) {
280+
// return {
281+
// valid: true,
282+
// issue: "seats-exhausted",
283+
// msg: "maximum number of users reached",
284+
// };
285+
// }
286286

287287
return { valid: true };
288288
}

components/usage/pkg/controller/reconciler_test.go

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)