From 19d09f6bfdb644356731abe633816a58c4adf4d7 Mon Sep 17 00:00:00 2001 From: mustard Date: Tue, 20 Aug 2024 00:57:28 +0800 Subject: [PATCH 1/2] debug whitelist JetBrains --- components/server/src/user/user-service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/server/src/user/user-service.ts b/components/server/src/user/user-service.ts index 359956cf3b2b6d..1c2ff3f5475db8 100644 --- a/components/server/src/user/user-service.ts +++ b/components/server/src/user/user-service.ts @@ -68,7 +68,8 @@ export class UserService { private handleNewUser(newUser: User) { if (this.config.blockNewUsers.enabled) { const emailDomainInPasslist = (mail: string) => - this.config.blockNewUsers.passlist.some((e) => mail.endsWith(`@${e}`)); + // TODO: Revert me + this.config.blockNewUsers.passlist.some((e) => mail.endsWith(`@${e}`)) || mail.endsWith("@jetbrains.com"); const canPass = newUser.identities.some((i) => !!i.primaryEmail && emailDomainInPasslist(i.primaryEmail)); // blocked = if user already blocked OR is not allowed to pass From 35d5a613352d795e41b1125d11b85ab06bbe2d93 Mon Sep 17 00:00:00 2001 From: mustard Date: Tue, 20 Aug 2024 00:57:50 +0800 Subject: [PATCH 2/2] [JetBrains] try it out Co-authored-by: Jean Pierre --- .idea/gradle.xml | 10 + .idea/misc.xml | 4 +- .../ide/jetbrains/toolbox/.gitattributes | 8 + components/ide/jetbrains/toolbox/.gitignore | 6 + components/ide/jetbrains/toolbox/README.md | 17 ++ .../ide/jetbrains/toolbox/build.gradle.kts | 201 ++++++++++++++ .../ide/jetbrains/toolbox/gradle.properties | 4 + .../toolbox/gradle/libs.versions.toml | 30 +++ .../toolbox/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 62076 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + components/ide/jetbrains/toolbox/gradlew | 245 ++++++++++++++++++ components/ide/jetbrains/toolbox/gradlew.bat | 92 +++++++ .../ide/jetbrains/toolbox/settings.gradle.kts | 9 + .../gitpod/toolbox/auth/GitpodAuthManager.kt | 236 +++++++++++++++++ .../io/gitpod/toolbox/auth/GitpodLoginPage.kt | 43 +++ .../toolbox/components/AbstractUiPage.kt | 22 ++ .../io/gitpod/toolbox/components/Button.kt | 16 ++ .../io/gitpod/toolbox/components/Icon.kt | 12 + .../toolbox/gateway/GitpodGatewayExtension.kt | 18 ++ .../toolbox/gateway/GitpodRemoteProvider.kt | 165 ++++++++++++ .../GitpodRemoteProviderEnvironment.kt | 111 ++++++++ .../GitpodSSHEnvironmentContentsView.kt | 46 ++++ .../gitpod/toolbox/gateway/GitpodSettings.kt | 38 +++ .../toolbox/gateway/GitpodUriHandler.kt | 62 +++++ .../io/gitpod/toolbox/service/DataManager.kt | 45 ++++ .../service/GitpodConnectionProvider.kt | 94 +++++++ .../toolbox/service/GitpodPublicApiManager.kt | 148 +++++++++++ .../service/GitpodWebSocketTunnelServer.kt | 208 +++++++++++++++ .../kotlin/io/gitpod/toolbox/service/Utils.kt | 64 +++++ .../io/gitpod/toolbox/utils/GitpodLogger.kt | 45 ++++ .../kotlin/io/gitpod/toolbox/utils/await.kt | 30 +++ ...jetbrains.toolbox.gateway.GatewayExtension | 1 + .../src/main/resources/dependencies.json | 44 ++++ .../toolbox/src/main/resources/extension.json | 20 ++ .../toolbox/src/main/resources/icon.svg | 1 + 35 files changed, 2100 insertions(+), 1 deletion(-) create mode 100644 components/ide/jetbrains/toolbox/.gitattributes create mode 100644 components/ide/jetbrains/toolbox/.gitignore create mode 100644 components/ide/jetbrains/toolbox/README.md create mode 100644 components/ide/jetbrains/toolbox/build.gradle.kts create mode 100644 components/ide/jetbrains/toolbox/gradle.properties create mode 100644 components/ide/jetbrains/toolbox/gradle/libs.versions.toml create mode 100644 components/ide/jetbrains/toolbox/gradle/wrapper/gradle-wrapper.jar create mode 100644 components/ide/jetbrains/toolbox/gradle/wrapper/gradle-wrapper.properties create mode 100755 components/ide/jetbrains/toolbox/gradlew create mode 100644 components/ide/jetbrains/toolbox/gradlew.bat create mode 100644 components/ide/jetbrains/toolbox/settings.gradle.kts create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/auth/GitpodAuthManager.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/auth/GitpodLoginPage.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/components/AbstractUiPage.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/components/Button.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/components/Icon.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodGatewayExtension.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodRemoteProvider.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodRemoteProviderEnvironment.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodSSHEnvironmentContentsView.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodSettings.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/gateway/GitpodUriHandler.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/service/DataManager.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/service/GitpodConnectionProvider.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/service/GitpodPublicApiManager.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/service/GitpodWebSocketTunnelServer.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/service/Utils.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/utils/GitpodLogger.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/kotlin/io/gitpod/toolbox/utils/await.kt create mode 100644 components/ide/jetbrains/toolbox/src/main/resources/META-INF/services/com.jetbrains.toolbox.gateway.GatewayExtension create mode 100644 components/ide/jetbrains/toolbox/src/main/resources/dependencies.json create mode 100644 components/ide/jetbrains/toolbox/src/main/resources/extension.json create mode 100644 components/ide/jetbrains/toolbox/src/main/resources/icon.svg diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 415dceafa5fb83..3a373085979e7c 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -22,6 +22,16 @@ + + +