@@ -126,11 +126,16 @@ export interface CustomizeState {
126
126
logo_rectangular : string ;
127
127
logo_square : string ;
128
128
max_upgrades : TypedMap < Partial < Upgrades > > ;
129
+
130
+ // Commercialization parameters.
131
+ // Be sure to also update disableCommercializationParameters
132
+ // below if you change these:
129
133
nonfree_countries ?: List < string > ;
130
134
limit_free_project_uptime : number ; // minutes
131
135
require_license_to_create_project ?: boolean ;
132
136
unlicensed_project_collaborator_limit ?: number ;
133
137
unlicensed_project_timetravel_limit ?: number ;
138
+
134
139
onprem_quota_heading : string ;
135
140
organization_email : string ;
136
141
organization_name : string ;
@@ -220,6 +225,7 @@ export class CustomizeActions extends Actions<CustomizeState> {
220
225
this . setState ( { compute_servers_images : `${ err } ` } ) ;
221
226
}
222
227
} ) ;
228
+
223
229
updateComputeServerImagesGoogle = reuseInFlight ( async ( reload ?) => {
224
230
if ( ! store . get ( "compute_servers_google-cloud_enabled" ) ) {
225
231
this . setState ( { compute_servers_images_google : fromJS ( { } ) as any } ) ;
@@ -235,6 +241,16 @@ export class CustomizeActions extends Actions<CustomizeState> {
235
241
this . setState ( { compute_servers_images_google : `${ err } ` } ) ;
236
242
}
237
243
} ) ;
244
+
245
+ // this is used for accounts that have legacy upgrades
246
+ disableCommercializationParameters = ( ) => {
247
+ this . setState ( {
248
+ limit_free_project_uptime : undefined ,
249
+ require_license_to_create_project : undefined ,
250
+ unlicensed_project_collaborator_limit : undefined ,
251
+ unlicensed_project_timetravel_limit : undefined ,
252
+ } ) ;
253
+ } ;
238
254
}
239
255
240
256
export const store = redux . createStore ( "customize" , CustomizeStore , defaults ) ;
@@ -317,6 +333,7 @@ function process_customize(obj) {
317
333
}
318
334
// the llm markup special case
319
335
obj . llm_markup = obj_orig . _llm_markup ?? 30 ;
336
+
320
337
// always set time, so other code can know for sure that customize was loaded.
321
338
// it also might be helpful to know when
322
339
obj [ "time" ] = Date . now ( ) ;
0 commit comments