1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 13:13:24 +00:00

remove hardcoded storage values (#6571)

This commit is contained in:
Kyle Denney
2025-11-17 11:16:02 -06:00
committed by GitHub
parent c620ec2aca
commit a9bb01031a
14 changed files with 85 additions and 23 deletions

View File

@@ -904,7 +904,6 @@ public class UserService : UserManager<User>, IUserService
}
else
{
user.MaxStorageGb = (short)(1 + additionalStorageGb);
user.LicenseKey = CoreHelpers.SecureRandomString(20);
}
@@ -977,7 +976,8 @@ public class UserService : UserManager<User>, IUserService
var premiumPlan = await _pricingClient.GetAvailablePremiumPlan();
var secret = await BillingHelpers.AdjustStorageAsync(_paymentService, user, storageAdjustmentGb, premiumPlan.Storage.StripePriceId);
var baseStorageGb = (short)premiumPlan.Storage.Provided;
var secret = await BillingHelpers.AdjustStorageAsync(_paymentService, user, storageAdjustmentGb, premiumPlan.Storage.StripePriceId, baseStorageGb);
await SaveUserAsync(user);
return secret;
}