mirror of
https://github.com/bitwarden/server.git
synced 2025-04-12 00:28:11 -05:00
Stopped subtracting grace period from expiration date when license is in trial (#3991)
This commit is contained in:
parent
cb55699d80
commit
ccaee0b719
@ -142,12 +142,13 @@ public class OrganizationSubscriptionResponseModel : OrganizationResponseModel
|
||||
{
|
||||
if (license != null)
|
||||
{
|
||||
// License expiration should always include grace period - See OrganizationLicense.cs
|
||||
// License expiration should always include grace period (unless it's in a Trial) - See OrganizationLicense.cs.
|
||||
Expiration = license.Expires;
|
||||
// Use license.ExpirationWithoutGracePeriod if available, otherwise assume license expiration minus grace period
|
||||
ExpirationWithoutGracePeriod = license.ExpirationWithoutGracePeriod ??
|
||||
license.Expires?.AddDays(-Constants
|
||||
.OrganizationSelfHostSubscriptionGracePeriodDays);
|
||||
|
||||
// Use license.ExpirationWithoutGracePeriod if available, otherwise assume license expiration minus grace period unless it's in a Trial.
|
||||
ExpirationWithoutGracePeriod = license.ExpirationWithoutGracePeriod ?? (license.Trial
|
||||
? license.Expires
|
||||
: license.Expires?.AddDays(-Constants.OrganizationSelfHostSubscriptionGracePeriodDays));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user