mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
[PM-14443] Cannot view pending MOE provider page (#4970)
This commit is contained in:
parent
00d041837f
commit
b8caa36c0e
@ -33,11 +33,12 @@ public class ProviderEditModel : ProviderViewModel, IValidatableObject
|
|||||||
GatewayCustomerUrl = gatewayCustomerUrl;
|
GatewayCustomerUrl = gatewayCustomerUrl;
|
||||||
GatewaySubscriptionUrl = gatewaySubscriptionUrl;
|
GatewaySubscriptionUrl = gatewaySubscriptionUrl;
|
||||||
Type = provider.Type;
|
Type = provider.Type;
|
||||||
|
|
||||||
if (Type == ProviderType.MultiOrganizationEnterprise)
|
if (Type == ProviderType.MultiOrganizationEnterprise)
|
||||||
{
|
{
|
||||||
var plan = providerPlans.Single();
|
var plan = providerPlans.SingleOrDefault();
|
||||||
EnterpriseMinimumSeats = plan.SeatMinimum;
|
EnterpriseMinimumSeats = plan?.SeatMinimum ?? 0;
|
||||||
Plan = plan.PlanType;
|
Plan = plan?.PlanType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,11 +11,10 @@ namespace Bit.Core.Billing.Extensions;
|
|||||||
public static class BillingExtensions
|
public static class BillingExtensions
|
||||||
{
|
{
|
||||||
public static bool IsBillable(this Provider provider) =>
|
public static bool IsBillable(this Provider provider) =>
|
||||||
provider is
|
provider.SupportsConsolidatedBilling() && provider.Status == ProviderStatusType.Billable;
|
||||||
{
|
|
||||||
Type: ProviderType.Msp or ProviderType.MultiOrganizationEnterprise,
|
public static bool SupportsConsolidatedBilling(this Provider provider)
|
||||||
Status: ProviderStatusType.Billable
|
=> provider.Type is ProviderType.Msp or ProviderType.MultiOrganizationEnterprise;
|
||||||
};
|
|
||||||
|
|
||||||
public static bool IsValidClient(this Organization organization)
|
public static bool IsValidClient(this Organization organization)
|
||||||
=> organization is
|
=> organization is
|
||||||
|
Loading…
Reference in New Issue
Block a user