1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-24 12:35:25 +01:00

[AC-2849] Update organization autoscaling error message when managed by CB MSP (#4489)

* Update autoscaling error message for CB MSP organizations

* Run dotnet format

* Update error message per Product requirements
This commit is contained in:
Alex Morask 2024-07-10 10:16:51 -04:00 committed by GitHub
parent 79a5ed42d5
commit de1b5371b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1438,9 +1438,20 @@ public class OrganizationService : IOrganizationService
var provider = await _providerRepository.GetByOrganizationIdAsync(organization.Id);
if (provider is { Enabled: true, Type: ProviderType.Reseller })
if (provider is { Enabled: true })
{
return (false, "Seat limit has been reached. Contact your provider to purchase additional seats.");
var consolidatedBillingEnabled = _featureService.IsEnabled(FeatureFlagKeys.EnableConsolidatedBilling);
if (consolidatedBillingEnabled && provider.Type == ProviderType.Msp &&
provider.Status == ProviderStatusType.Billable)
{
return (false, "Seat limit has been reached. Please contact your provider to add more seats.");
}
if (provider.Type == ProviderType.Reseller)
{
return (false, "Seat limit has been reached. Contact your provider to purchase additional seats.");
}
}
if (organization.Seats.HasValue &&