1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-06 18:42:49 -05:00

license dates

This commit is contained in:
Kyle Spearrin
2017-08-15 15:31:42 -04:00
parent b1443b4f94
commit ee9ec680a9
5 changed files with 53 additions and 12 deletions

View File

@ -22,7 +22,8 @@ namespace Bit.Core.Models.Business
Premium = user.Premium;
MaxStorageGb = user.MaxStorageGb;
Issued = DateTime.UtcNow;
Expires = billingInfo?.UpcomingInvoice?.Date;
Expires = billingInfo?.UpcomingInvoice?.Date?.AddDays(7);
Refresh = billingInfo?.UpcomingInvoice?.Date;
Trial = (billingInfo?.Subscription?.TrialEndDate.HasValue ?? false) &&
billingInfo.Subscription.TrialEndDate.Value > DateTime.UtcNow;
Signature = Convert.ToBase64String(licenseService.SignLicense(this));