1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-21 13:05:11 -05:00

Stopped subtracting grace period from expiration date when license is in trial (#3991)

This commit is contained in:
Alex Morask 2024-04-30 10:55:05 -04:00 committed by GitHub
parent cb55699d80
commit ccaee0b719
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,12 +142,13 @@ public class OrganizationSubscriptionResponseModel : OrganizationResponseModel
{ {
if (license != null) 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; Expiration = license.Expires;
// Use license.ExpirationWithoutGracePeriod if available, otherwise assume license expiration minus grace period
ExpirationWithoutGracePeriod = license.ExpirationWithoutGracePeriod ?? // Use license.ExpirationWithoutGracePeriod if available, otherwise assume license expiration minus grace period unless it's in a Trial.
license.Expires?.AddDays(-Constants ExpirationWithoutGracePeriod = license.ExpirationWithoutGracePeriod ?? (license.Trial
.OrganizationSelfHostSubscriptionGracePeriodDays); ? license.Expires
: license.Expires?.AddDays(-Constants.OrganizationSelfHostSubscriptionGracePeriodDays));
} }
} }