mirror of
https://github.com/bitwarden/server
synced 2026-01-10 20:44:05 +00:00
[PM 21897]Add Manual Enable/Disable Override for Providers in Admin Portal (#6072)
* Add the changes for the enable provider * remove the wanted permission added * Added a unit testing for the updateAsync
This commit is contained in:
@@ -38,6 +38,7 @@ public class ProviderEditModel : ProviderViewModel, IValidatableObject
|
||||
GatewaySubscriptionUrl = gatewaySubscriptionUrl;
|
||||
Type = provider.Type;
|
||||
PayByInvoice = payByInvoice;
|
||||
Enabled = provider.Enabled;
|
||||
|
||||
if (Type == ProviderType.BusinessUnit)
|
||||
{
|
||||
@@ -78,10 +79,14 @@ public class ProviderEditModel : ProviderViewModel, IValidatableObject
|
||||
[Display(Name = "Enterprise Seats Minimum")]
|
||||
public int? EnterpriseMinimumSeats { get; set; }
|
||||
|
||||
[Display(Name = "Enabled")]
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public virtual Provider ToProvider(Provider existingProvider)
|
||||
{
|
||||
existingProvider.BillingEmail = BillingEmail?.ToLowerInvariant().Trim();
|
||||
existingProvider.BillingPhone = BillingPhone?.ToLowerInvariant().Trim();
|
||||
existingProvider.Enabled = Enabled;
|
||||
switch (Type)
|
||||
{
|
||||
case ProviderType.Msp:
|
||||
|
||||
Reference in New Issue
Block a user