mirror of
https://github.com/bitwarden/server.git
synced 2025-04-04 20:50:21 -05:00
Check to see if cancellation comment is populated before disablement checks (#5468)
This commit is contained in:
parent
8da2cde939
commit
382a8f1ac0
@ -40,10 +40,15 @@ public class SubscriptionDeletedHandler : ISubscriptionDeletedHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (organizationId.HasValue &&
|
if (organizationId.HasValue)
|
||||||
subscription.CancellationDetails.Comment != providerMigrationCancellationComment &&
|
|
||||||
!subscription.CancellationDetails.Comment.Contains(addedToProviderCancellationComment))
|
|
||||||
{
|
{
|
||||||
|
if (!string.IsNullOrEmpty(subscription.CancellationDetails?.Comment) &&
|
||||||
|
(subscription.CancellationDetails.Comment == providerMigrationCancellationComment ||
|
||||||
|
subscription.CancellationDetails.Comment.Contains(addedToProviderCancellationComment)))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await _organizationService.DisableAsync(organizationId.Value, subscription.CurrentPeriodEnd);
|
await _organizationService.DisableAsync(organizationId.Value, subscription.CurrentPeriodEnd);
|
||||||
}
|
}
|
||||||
else if (userId.HasValue)
|
else if (userId.HasValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user