|
5 | 5 | */
|
6 | 6 |
|
7 | 7 | 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"; |
9 | 16 | import { inject } from "inversify";
|
10 | 17 | import { LicenseEvaluator } from "@gitpod/licensor/lib";
|
11 | 18 | import { Feature } from "@gitpod/licensor/lib/api";
|
12 |
| -import { AuthException } from "../../../src/auth/errors"; |
| 19 | +//import { AuthException } from "../../../src/auth/errors"; |
13 | 20 | import { EligibilityService } from "./eligibility-service";
|
14 | 21 | import { SubscriptionService } from "@gitpod/gitpod-payment-endpoint/lib/accounting";
|
15 | 22 | import { OssAllowListDB } from "@gitpod/gitpod-db/lib/oss-allowlist-db";
|
@@ -75,16 +82,14 @@ export class UserServiceEE extends UserService {
|
75 | 82 |
|
76 | 83 | async checkSignUp(params: CheckSignUpParams) {
|
77 | 84 | // todo@at: check if we need an optimization for SaaS here. used to be a no-op there.
|
78 |
| - |
79 | 85 | // 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); |
88 | 93 | }
|
89 | 94 |
|
90 | 95 | async checkTermsAcceptanceRequired(params: CheckTermsParams): Promise<boolean> {
|
|
0 commit comments