Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AccountDeleter]Adding stubbed definition for missing DI objects. #8677

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The order of dependencies?


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