File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ export const WorkspaceFeatureFlags = {
295
295
persistent_volume_claim : undefined ,
296
296
protected_secrets : undefined ,
297
297
workspace_class_limiting : undefined ,
298
+ workspace_connection_limiting : undefined ,
298
299
} ;
299
300
export type NamedWorkspaceFeatureFlag = keyof typeof WorkspaceFeatureFlags ;
300
301
Original file line number Diff line number Diff line change @@ -859,6 +859,21 @@ export class WorkspaceStarter {
859
859
}
860
860
}
861
861
862
+ const wsConnectionLimitingEnabled = await getExperimentsClientForBackend ( ) . getValueAsync (
863
+ "workspace_connection_limiting" ,
864
+ false ,
865
+ { user } ,
866
+ ) ;
867
+ if ( wsConnectionLimitingEnabled ) {
868
+ const shouldLimitNetworkConnections = await this . entitlementService . limitNetworkConnections (
869
+ user ,
870
+ new Date ( ) ,
871
+ ) ;
872
+ if ( shouldLimitNetworkConnections ) {
873
+ featureFlags = featureFlags . concat ( [ "workspace_connection_limiting" ] ) ;
874
+ }
875
+ }
876
+
862
877
let workspaceClass = "" ;
863
878
const userTeams = await this . teamDB . findTeamsByUser ( user . id ) ;
864
879
let classesEnabled = await getExperimentsClientForBackend ( ) . getValueAsync ( "workspace_classes" , false , {
You can’t perform that action at this time.
0 commit comments