1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-07 02:52:50 -05:00

[PM-13783] Battle harden ProviderType enum expansion (#5004)

Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
Jonas Hendrickx
2024-11-13 15:01:26 +01:00
committed by GitHub
parent b1776240ea
commit 6f7cdcfcea
2 changed files with 7 additions and 3 deletions

View File

@ -14,7 +14,10 @@ public static class BillingExtensions
provider.SupportsConsolidatedBilling() && provider.Status == ProviderStatusType.Billable;
public static bool SupportsConsolidatedBilling(this Provider provider)
=> provider.Type is ProviderType.Msp or ProviderType.MultiOrganizationEnterprise;
=> provider.Type.SupportsConsolidatedBilling();
public static bool SupportsConsolidatedBilling(this ProviderType providerType)
=> providerType is ProviderType.Msp or ProviderType.MultiOrganizationEnterprise;
public static bool IsValidClient(this Organization organization)
=> organization is