@@ -210,12 +210,6 @@ export class UserService {
210
210
"You're no longer a member of the selected billing team." ,
211
211
) ;
212
212
}
213
- if ( await this . isUnbilledTeam ( attribution ) ) {
214
- throw new ResponseError (
215
- ErrorCodes . INVALID_COST_CENTER ,
216
- "The billing team you've selected does not have billing enabled." ,
217
- ) ;
218
- }
219
213
}
220
214
if ( attribution . kind === "user" ) {
221
215
if ( user . id !== attribution . userId ) {
@@ -258,11 +252,7 @@ export class UserService {
258
252
} else {
259
253
attributionId = AttributionId . create ( user ) ;
260
254
}
261
- if (
262
- ! ! attributionId &&
263
- ( await this . hasCredits ( attributionId ) ) &&
264
- ! ( await this . isUnbilledTeam ( attributionId ) )
265
- ) {
255
+ if ( ! ! attributionId && ( await this . hasCredits ( attributionId ) ) ) {
266
256
return attributionId ;
267
257
}
268
258
}
@@ -317,14 +307,6 @@ export class UserService {
317
307
return response . usedCredits < response . usageLimit ;
318
308
}
319
309
320
- protected async isUnbilledTeam ( attributionId : AttributionId ) : Promise < boolean > {
321
- if ( attributionId . kind !== "team" ) {
322
- return false ;
323
- }
324
- const billingStrategy = await this . usageService . getCurrentBillingStategy ( attributionId ) ;
325
- return billingStrategy !== CostCenter_BillingStrategy . BILLING_STRATEGY_STRIPE ;
326
- }
327
-
328
310
async setUsageAttribution ( user : User , usageAttributionId : string ) : Promise < void > {
329
311
await this . validateUsageAttributionId ( user , usageAttributionId ) ;
330
312
user . usageAttributionId = usageAttributionId ;
0 commit comments