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) {
179179 inMemoryDatabase . scopes [ scope . name ] = scope ;
180180 }
181181}
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";
1515import { URL } from "url" ;
1616import { Config } from "../config" ;
1717import { 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" ;
1920
2021@injectable ( )
2122export class OAuthController {
@@ -147,6 +148,18 @@ export class OAuthController {
147148 return ;
148149 }
149150
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+
150163 const request = new OAuthRequest ( req ) ;
151164
152165 try {
You can’t perform that action at this time.
0 commit comments