mirror of
https://github.com/bitwarden/server.git
synced 2025-04-15 01:58:14 -05:00
[PM-18170] Remove PM-15814-alert-owners-of-reseller-managed-orgs (#5412)
This commit is contained in:
parent
8d4c3d83b2
commit
f8e89f1747
@ -1,6 +1,5 @@
|
|||||||
using Bit.Billing.Constants;
|
using Bit.Billing.Constants;
|
||||||
using Bit.Billing.Jobs;
|
using Bit.Billing.Jobs;
|
||||||
using Bit.Core;
|
|
||||||
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
|
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
|
||||||
using Bit.Core.Billing.Pricing;
|
using Bit.Core.Billing.Pricing;
|
||||||
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
|
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
|
||||||
@ -24,7 +23,6 @@ public class SubscriptionUpdatedHandler : ISubscriptionUpdatedHandler
|
|||||||
private readonly IPushNotificationService _pushNotificationService;
|
private readonly IPushNotificationService _pushNotificationService;
|
||||||
private readonly IOrganizationRepository _organizationRepository;
|
private readonly IOrganizationRepository _organizationRepository;
|
||||||
private readonly ISchedulerFactory _schedulerFactory;
|
private readonly ISchedulerFactory _schedulerFactory;
|
||||||
private readonly IFeatureService _featureService;
|
|
||||||
private readonly IOrganizationEnableCommand _organizationEnableCommand;
|
private readonly IOrganizationEnableCommand _organizationEnableCommand;
|
||||||
private readonly IOrganizationDisableCommand _organizationDisableCommand;
|
private readonly IOrganizationDisableCommand _organizationDisableCommand;
|
||||||
private readonly IPricingClient _pricingClient;
|
private readonly IPricingClient _pricingClient;
|
||||||
@ -39,7 +37,6 @@ public class SubscriptionUpdatedHandler : ISubscriptionUpdatedHandler
|
|||||||
IPushNotificationService pushNotificationService,
|
IPushNotificationService pushNotificationService,
|
||||||
IOrganizationRepository organizationRepository,
|
IOrganizationRepository organizationRepository,
|
||||||
ISchedulerFactory schedulerFactory,
|
ISchedulerFactory schedulerFactory,
|
||||||
IFeatureService featureService,
|
|
||||||
IOrganizationEnableCommand organizationEnableCommand,
|
IOrganizationEnableCommand organizationEnableCommand,
|
||||||
IOrganizationDisableCommand organizationDisableCommand,
|
IOrganizationDisableCommand organizationDisableCommand,
|
||||||
IPricingClient pricingClient)
|
IPricingClient pricingClient)
|
||||||
@ -53,7 +50,6 @@ public class SubscriptionUpdatedHandler : ISubscriptionUpdatedHandler
|
|||||||
_pushNotificationService = pushNotificationService;
|
_pushNotificationService = pushNotificationService;
|
||||||
_organizationRepository = organizationRepository;
|
_organizationRepository = organizationRepository;
|
||||||
_schedulerFactory = schedulerFactory;
|
_schedulerFactory = schedulerFactory;
|
||||||
_featureService = featureService;
|
|
||||||
_organizationEnableCommand = organizationEnableCommand;
|
_organizationEnableCommand = organizationEnableCommand;
|
||||||
_organizationDisableCommand = organizationDisableCommand;
|
_organizationDisableCommand = organizationDisableCommand;
|
||||||
_pricingClient = pricingClient;
|
_pricingClient = pricingClient;
|
||||||
@ -227,12 +223,6 @@ public class SubscriptionUpdatedHandler : ISubscriptionUpdatedHandler
|
|||||||
|
|
||||||
private async Task ScheduleCancellationJobAsync(string subscriptionId, Guid organizationId)
|
private async Task ScheduleCancellationJobAsync(string subscriptionId, Guid organizationId)
|
||||||
{
|
{
|
||||||
var isResellerManagedOrgAlertEnabled = _featureService.IsEnabled(FeatureFlagKeys.ResellerManagedOrgAlert);
|
|
||||||
if (!isResellerManagedOrgAlertEnabled)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var scheduler = await _schedulerFactory.GetScheduler();
|
var scheduler = await _schedulerFactory.GetScheduler();
|
||||||
|
|
||||||
var job = JobBuilder.Create<SubscriptionCancellationJob>()
|
var job = JobBuilder.Create<SubscriptionCancellationJob>()
|
||||||
|
@ -141,7 +141,6 @@ public static class FeatureFlagKeys
|
|||||||
/* Billing Team */
|
/* Billing Team */
|
||||||
public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email";
|
public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email";
|
||||||
public const string TrialPayment = "PM-8163-trial-payment";
|
public const string TrialPayment = "PM-8163-trial-payment";
|
||||||
public const string ResellerManagedOrgAlert = "PM-15814-alert-owners-of-reseller-managed-orgs";
|
|
||||||
public const string UsePricingService = "use-pricing-service";
|
public const string UsePricingService = "use-pricing-service";
|
||||||
public const string P15179_AddExistingOrgsFromProviderPortal = "pm-15179-add-existing-orgs-from-provider-portal";
|
public const string P15179_AddExistingOrgsFromProviderPortal = "pm-15179-add-existing-orgs-from-provider-portal";
|
||||||
public const string PM12276Breadcrumbing = "pm-12276-breadcrumbing-for-business-features";
|
public const string PM12276Breadcrumbing = "pm-12276-breadcrumbing-for-business-features";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using Bit.Billing.Constants;
|
using Bit.Billing.Constants;
|
||||||
using Bit.Billing.Services;
|
using Bit.Billing.Services;
|
||||||
using Bit.Billing.Services.Implementations;
|
using Bit.Billing.Services.Implementations;
|
||||||
using Bit.Core;
|
|
||||||
using Bit.Core.AdminConsole.Entities;
|
using Bit.Core.AdminConsole.Entities;
|
||||||
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
|
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
|
||||||
using Bit.Core.Billing.Enums;
|
using Bit.Core.Billing.Enums;
|
||||||
@ -31,7 +30,6 @@ public class SubscriptionUpdatedHandlerTests
|
|||||||
private readonly IPushNotificationService _pushNotificationService;
|
private readonly IPushNotificationService _pushNotificationService;
|
||||||
private readonly IOrganizationRepository _organizationRepository;
|
private readonly IOrganizationRepository _organizationRepository;
|
||||||
private readonly ISchedulerFactory _schedulerFactory;
|
private readonly ISchedulerFactory _schedulerFactory;
|
||||||
private readonly IFeatureService _featureService;
|
|
||||||
private readonly IOrganizationEnableCommand _organizationEnableCommand;
|
private readonly IOrganizationEnableCommand _organizationEnableCommand;
|
||||||
private readonly IOrganizationDisableCommand _organizationDisableCommand;
|
private readonly IOrganizationDisableCommand _organizationDisableCommand;
|
||||||
private readonly IPricingClient _pricingClient;
|
private readonly IPricingClient _pricingClient;
|
||||||
@ -49,7 +47,6 @@ public class SubscriptionUpdatedHandlerTests
|
|||||||
_pushNotificationService = Substitute.For<IPushNotificationService>();
|
_pushNotificationService = Substitute.For<IPushNotificationService>();
|
||||||
_organizationRepository = Substitute.For<IOrganizationRepository>();
|
_organizationRepository = Substitute.For<IOrganizationRepository>();
|
||||||
_schedulerFactory = Substitute.For<ISchedulerFactory>();
|
_schedulerFactory = Substitute.For<ISchedulerFactory>();
|
||||||
_featureService = Substitute.For<IFeatureService>();
|
|
||||||
_organizationEnableCommand = Substitute.For<IOrganizationEnableCommand>();
|
_organizationEnableCommand = Substitute.For<IOrganizationEnableCommand>();
|
||||||
_organizationDisableCommand = Substitute.For<IOrganizationDisableCommand>();
|
_organizationDisableCommand = Substitute.For<IOrganizationDisableCommand>();
|
||||||
_pricingClient = Substitute.For<IPricingClient>();
|
_pricingClient = Substitute.For<IPricingClient>();
|
||||||
@ -67,7 +64,6 @@ public class SubscriptionUpdatedHandlerTests
|
|||||||
_pushNotificationService,
|
_pushNotificationService,
|
||||||
_organizationRepository,
|
_organizationRepository,
|
||||||
_schedulerFactory,
|
_schedulerFactory,
|
||||||
_featureService,
|
|
||||||
_organizationEnableCommand,
|
_organizationEnableCommand,
|
||||||
_organizationDisableCommand,
|
_organizationDisableCommand,
|
||||||
_pricingClient);
|
_pricingClient);
|
||||||
@ -97,9 +93,6 @@ public class SubscriptionUpdatedHandlerTests
|
|||||||
_stripeEventUtilityService.GetIdsFromMetadata(Arg.Any<Dictionary<string, string>>())
|
_stripeEventUtilityService.GetIdsFromMetadata(Arg.Any<Dictionary<string, string>>())
|
||||||
.Returns(Tuple.Create<Guid?, Guid?, Guid?>(organizationId, null, null));
|
.Returns(Tuple.Create<Guid?, Guid?, Guid?>(organizationId, null, null));
|
||||||
|
|
||||||
_featureService.IsEnabled(FeatureFlagKeys.ResellerManagedOrgAlert)
|
|
||||||
.Returns(true);
|
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await _sut.HandleAsync(parsedEvent);
|
await _sut.HandleAsync(parsedEvent);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user