Skip to content

Commit

Permalink
Adding stubbed definition for missing DI objects For AccountDeleter. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuyu authored Jul 22, 2021
1 parent 92104dc commit 7e88712
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/AccountDeleter/AccountDeleter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<Compile Include="Configuration\GalleryConfiguration.cs" />
<Compile Include="Configuration\MailTemplateConfiguration.cs" />
<Compile Include="Configuration\SourceConfiguration.cs" />
<Compile Include="EmptyFeatureFlagService.cs" />
<Compile Include="EmptyIndexingService.cs" />
<Compile Include="Evaluators\AccountConfirmedEvaluator.cs" />
<Compile Include="Evaluators\AggregateEvaluator.cs" />
Expand Down
264 changes: 264 additions & 0 deletions src/AccountDeleter/EmptyFeatureFlagService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using NuGet.Services.Entities;
using System;
using System.Collections.Generic;

namespace NuGetGallery.AccountDeleter
{
public class EmptyFeatureFlagService : IFeatureFlagService
{
public bool AreDynamicODataCacheDurationsEnabled()
{
throw new NotImplementedException();
}

public bool AreEmbeddedIconsEnabled(User user)
{
throw new NotImplementedException();
}

public bool AreEmbeddedReadmesEnabled(User user)
{
throw new NotImplementedException();
}

public bool ArePatternSetTfmHeuristicsEnabled()
{
//Until this feature is enabled by default, we will assume it is turned off here.
//This is the only used feature flag that was added.
return false;
}

public bool IsABTestingEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsAdvancedSearchEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsAlternateStatisticsSourceEnabled()
{
throw new NotImplementedException();
}

public bool IsAsyncAccountDeleteEnabled()
{
throw new NotImplementedException();
}

public bool IsDeletePackageApiEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsDisplayBannerEnabled()
{
throw new NotImplementedException();
}

public bool IsDisplayFuGetLinksEnabled()
{
throw new NotImplementedException();
}

public bool IsDisplayPackagePageV2Enabled(User user)
{
throw new NotImplementedException();
}

public bool IsDisplayVulnerabilitiesEnabled()
{
throw new NotImplementedException();
}

public bool IsForceFlatContainerIconsEnabled()
{
throw new NotImplementedException();
}

public bool IsGet2FADismissFeedbackEnabled()
{
throw new NotImplementedException();
}

public bool IsGitHubUsageEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsGravatarProxyEnabled()
{
throw new NotImplementedException();
}

public bool IsImageAllowlistEnabled()
{
throw new NotImplementedException();
}

public bool IsLicenseMdRenderingEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsManageDeprecationApiEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsManageDeprecationEnabled(User user, PackageRegistration registration)
{
throw new NotImplementedException();
}

public bool IsManageDeprecationEnabled(User user, IEnumerable<Package> allVersions)
{
throw new NotImplementedException();
}

public bool IsManagePackagesVulnerabilitiesEnabled()
{
throw new NotImplementedException();
}

public bool IsMarkdigMdRenderingEnabled()
{
throw new NotImplementedException();
}

public bool IsODataDatabaseReadOnlyEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1FindPackagesByIdCountNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1FindPackagesByIdNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1GetAllCountEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1GetAllEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1GetSpecificNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1SearchCountNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV1SearchNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2FindPackagesByIdCountNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2FindPackagesByIdNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2GetAllCountNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2GetAllNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2GetSpecificNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2SearchCountNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsODataV2SearchNonHijackedEnabled()
{
throw new NotImplementedException();
}

public bool IsPackageDependentsEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsPackageRenamesEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsPackagesAtomFeedEnabled()
{
throw new NotImplementedException();
}

public bool IsPreviewHijackEnabled()
{
throw new NotImplementedException();
}

public bool IsSearchSideBySideEnabled(User user)
{
throw new NotImplementedException();
}

public bool IsSelfServiceAccountDeleteEnabled()
{
throw new NotImplementedException();
}

public bool IsShowEnable2FADialogEnabled()
{
throw new NotImplementedException();
}

public bool IsShowReportAbuseSafetyChangesEnabled()
{
throw new NotImplementedException();
}

public bool IsTyposquattingEnabled()
{
throw new NotImplementedException();
}

public bool IsTyposquattingEnabled(User user)
{
throw new NotImplementedException();
}

public bool ProxyGravatarEnSubdomain()
{
throw new NotImplementedException();
}
}
}
5 changes: 4 additions & 1 deletion src/AccountDeleter/EmptyIndexingService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
1 change: 1 addition & 0 deletions src/AccountDeleter/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ protected void ConfigureGalleryServices(IServiceCollection services)
services.AddScoped<IAuthenticationService, AuthenticationService>();
services.AddScoped<ISupportRequestService, ISupportRequestService>();

services.AddScoped<IFeatureFlagService, EmptyFeatureFlagService>();
services.AddScoped<IEditableFeatureFlagStorageService, EditableFeatureFlagFileStorageService>();
services.AddScoped<ICoreFileStorageService, CloudBlobFileStorageService>();
services.AddScoped<ICloudBlobContainerInformationProvider, GalleryCloudBlobContainerInformationProvider>();
Expand Down

0 comments on commit 7e88712

Please sign in to comment.