diff --git a/src/AccountDeleter/Configuration/GalleryConfiguration.cs b/src/AccountDeleter/Configuration/GalleryConfiguration.cs index 6eda0ca953..9a0b06117a 100644 --- a/src/AccountDeleter/Configuration/GalleryConfiguration.cs +++ b/src/AccountDeleter/Configuration/GalleryConfiguration.cs @@ -120,5 +120,6 @@ public string SiteRoot public int MaxJsonLengthOverride { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public int MaxOwnerPerPackageRegistration { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public int MaxOwnerRequestsPerPackageRegistration { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public string ExternalYourPrivacyChoicesUrl { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } } } diff --git a/src/NuGetGallery.Services/Configuration/AppConfiguration.cs b/src/NuGetGallery.Services/Configuration/AppConfiguration.cs index 98d67d4299..359d21a9e7 100644 --- a/src/NuGetGallery.Services/Configuration/AppConfiguration.cs +++ b/src/NuGetGallery.Services/Configuration/AppConfiguration.cs @@ -323,6 +323,11 @@ public class AppConfiguration : IAppConfiguration /// public string ExternalPrivacyPolicyUrl { get; set; } + /// + /// Gets/sets a string that is a link to an external "Your Privacy Choices" page + /// + public string ExternalYourPrivacyChoicesUrl { get; set; } + /// /// Gets/sets a string that is a link to an external terms of use document /// diff --git a/src/NuGetGallery.Services/Configuration/IAppConfiguration.cs b/src/NuGetGallery.Services/Configuration/IAppConfiguration.cs index 32a75c290e..11ee16b761 100644 --- a/src/NuGetGallery.Services/Configuration/IAppConfiguration.cs +++ b/src/NuGetGallery.Services/Configuration/IAppConfiguration.cs @@ -349,6 +349,11 @@ public interface IAppConfiguration : IMessageServiceConfiguration /// string ExternalPrivacyPolicyUrl { get; set; } + /// + /// Gets/sets a string that is a link to an external privacy choices page + /// + string ExternalYourPrivacyChoicesUrl { get; set; } + /// /// Gets/sets a string that is a link to an external terms of use document /// diff --git a/src/NuGetGallery/UrlHelperExtensions.cs b/src/NuGetGallery/UrlHelperExtensions.cs index 6b4c653867..8ac746b323 100644 --- a/src/NuGetGallery/UrlHelperExtensions.cs +++ b/src/NuGetGallery/UrlHelperExtensions.cs @@ -1471,6 +1471,16 @@ public static string Privacy(this UrlHelper url, bool relativeUrl = true) return GetActionLink(url, "Privacy", "Pages", relativeUrl); } + public static string YourPrivacyChoices(this UrlHelper url, bool relativeUrl = true) + { + if (!String.IsNullOrEmpty(_configuration.Current.ExternalYourPrivacyChoicesUrl)) + { + return _configuration.Current.ExternalYourPrivacyChoicesUrl; + } + + return GetActionLink(url, "Your Privacy Choices", "Pages", relativeUrl); + } + public static string ExternalPrivacyUrl(this UrlHelper url) { return _configuration.Current.ExternalPrivacyPolicyUrl; diff --git a/src/NuGetGallery/Views/Shared/Gallery/Footer.cshtml b/src/NuGetGallery/Views/Shared/Gallery/Footer.cshtml index 55b67ab238..c462d7c836 100644 --- a/src/NuGetGallery/Views/Shared/Gallery/Footer.cshtml +++ b/src/NuGetGallery/Views/Shared/Gallery/Footer.cshtml @@ -34,7 +34,8 @@ !String.IsNullOrEmpty(this.Config.Current.ExternalBrandingUrl) || !String.IsNullOrEmpty(this.Config.Current.ExternalAboutUrl) || !String.IsNullOrEmpty(this.Config.Current.ExternalTermsOfUseUrl) || - !String.IsNullOrEmpty(this.Config.Current.ExternalPrivacyPolicyUrl)) + !String.IsNullOrEmpty(this.Config.Current.ExternalPrivacyPolicyUrl) || + !String.IsNullOrEmpty(this.Config.Current.ExternalYourPrivacyChoicesUrl)) {