File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
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,10 +859,25 @@ export class WorkspaceStarter {
859
859
}
860
860
}
861
861
862
- let workspaceClass = "" ;
863
862
const userTeams = await this . teamDB . findTeamsByUser ( user . id ) ;
863
+ const wsConnectionLimitingEnabled = await getExperimentsClientForBackend ( ) . getValueAsync (
864
+ "workspace_connection_limiting" ,
865
+ false ,
866
+ { user, teams : userTeams } ,
867
+ ) ;
868
+ if ( wsConnectionLimitingEnabled ) {
869
+ const shouldLimitNetworkConnections = await this . entitlementService . limitNetworkConnections (
870
+ user ,
871
+ new Date ( ) ,
872
+ ) ;
873
+ if ( shouldLimitNetworkConnections ) {
874
+ featureFlags = featureFlags . concat ( [ "workspace_connection_limiting" ] ) ;
875
+ }
876
+ }
877
+
878
+ let workspaceClass = "" ;
864
879
let classesEnabled = await getExperimentsClientForBackend ( ) . getValueAsync ( "workspace_classes" , false , {
865
- user : user ,
880
+ user,
866
881
teams : userTeams ,
867
882
} ) ;
868
883
const usageAttributionId = await this . userService . getWorkspaceUsageAttributionId ( user , workspace . projectId ) ;
You can’t perform that action at this time.
0 commit comments