File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
components/server/src/oauth-server Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -179,3 +179,5 @@ for (const clientId in inMemoryDatabase.clients) {
179
179
inMemoryDatabase . scopes [ scope . name ] = scope ;
180
180
}
181
181
}
182
+
183
+ export const toolboxClient = toolbox ;
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ import { inject, injectable } from "inversify";
15
15
import { URL } from "url" ;
16
16
import { Config } from "../config" ;
17
17
import { clientRepository , createAuthorizationServer } from "./oauth-authorization-server" ;
18
- import { inMemoryDatabase } from "./db" ;
18
+ import { inMemoryDatabase , toolboxClient } from "./db" ;
19
+ import { getExperimentsClientForBackend } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server" ;
19
20
20
21
@injectable ( )
21
22
export class OAuthController {
@@ -147,6 +148,18 @@ export class OAuthController {
147
148
return ;
148
149
}
149
150
151
+ if ( clientID === toolboxClient . id ) {
152
+ const enableExperimentalJBTB = await getExperimentsClientForBackend ( ) . getValueAsync (
153
+ "enable_experimental_jbtb" ,
154
+ false ,
155
+ { user } ,
156
+ ) ;
157
+ if ( ! enableExperimentalJBTB ) {
158
+ res . sendStatus ( 400 ) ;
159
+ return false ;
160
+ }
161
+ }
162
+
150
163
const request = new OAuthRequest ( req ) ;
151
164
152
165
try {
You can’t perform that action at this time.
0 commit comments