@@ -126,11 +126,16 @@ export interface CustomizeState {
126126 logo_rectangular : string ;
127127 logo_square : string ;
128128 max_upgrades : TypedMap < Partial < Upgrades > > ;
129+
130+ // Commercialization parameters.
131+ // Be sure to also update disableCommercializationParameters
132+ // below if you change these:
129133 nonfree_countries ?: List < string > ;
130134 limit_free_project_uptime : number ; // minutes
131135 require_license_to_create_project ?: boolean ;
132136 unlicensed_project_collaborator_limit ?: number ;
133137 unlicensed_project_timetravel_limit ?: number ;
138+
134139 onprem_quota_heading : string ;
135140 organization_email : string ;
136141 organization_name : string ;
@@ -220,6 +225,7 @@ export class CustomizeActions extends Actions<CustomizeState> {
220225 this . setState ( { compute_servers_images : `${ err } ` } ) ;
221226 }
222227 } ) ;
228+
223229 updateComputeServerImagesGoogle = reuseInFlight ( async ( reload ?) => {
224230 if ( ! store . get ( "compute_servers_google-cloud_enabled" ) ) {
225231 this . setState ( { compute_servers_images_google : fromJS ( { } ) as any } ) ;
@@ -235,6 +241,16 @@ export class CustomizeActions extends Actions<CustomizeState> {
235241 this . setState ( { compute_servers_images_google : `${ err } ` } ) ;
236242 }
237243 } ) ;
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+ } ;
238254}
239255
240256export const store = redux . createStore ( "customize" , CustomizeStore , defaults ) ;
@@ -317,6 +333,7 @@ function process_customize(obj) {
317333 }
318334 // the llm markup special case
319335 obj . llm_markup = obj_orig . _llm_markup ?? 30 ;
336+
320337 // always set time, so other code can know for sure that customize was loaded.
321338 // it also might be helpful to know when
322339 obj [ "time" ] = Date . now ( ) ;
0 commit comments