Permalink
Browse files

Merge pull request #4348 from NuGet/dev

[ReleasePrep][2017.07.12]FI of dev into master for NuGetGallery
  • Loading branch information...
2 parents c45a04d + 51c7e35 commit c60708d538bd4e6732b365bc4bf9b7ef50d1cd5b @skofman1 skofman1 committed Jul 7, 2017
Showing with 9,238 additions and 43 deletions.
  1. +2 −1 src/NuGetGallery/App_Start/AppActivator.cs
  2. +2 −3 src/NuGetGallery/App_Start/OwinStartup.cs
  3. +8 −4 src/NuGetGallery/Configuration/AppConfiguration.cs
  4. +8 −3 src/NuGetGallery/Configuration/IAppConfiguration.cs
  5. +34 −0 src/NuGetGallery/Configuration/StringArrayConverter.cs
  6. +21 −0 src/NuGetGallery/Content/Layout.css
  7. +8,921 −0 src/NuGetGallery/Content/fabric.css
  8. +5 −0 src/NuGetGallery/Controllers/ApiController.cs
  9. +7 −1 src/NuGetGallery/Controllers/PackagesController.cs
  10. +32 −0 src/NuGetGallery/Infrastructure/HttpStatusCodeWithServerWarningResult.cs
  11. +3 −0 src/NuGetGallery/NuGetGallery.csproj
  12. +7 −0 src/NuGetGallery/RequestModels/VerifyPackageRequest.cs
  13. +1 −1 src/NuGetGallery/Services/PackageDeleteService.cs
  14. +5 −5 src/NuGetGallery/Services/PackageService.cs
  15. +4 −1 src/NuGetGallery/Services/ReflowPackageService.cs
  16. +9 −0 src/NuGetGallery/Strings.Designer.cs
  17. +3 −0 src/NuGetGallery/Strings.resx
  18. +1 −0 src/NuGetGallery/Views/Packages/Delete.cshtml
  19. +31 −4 src/NuGetGallery/Views/Packages/VerifyPackage.cshtml
  20. +9 −0 src/NuGetGallery/Views/Shared/Layout.cshtml
  21. +6 −4 src/NuGetGallery/Web.config
  22. +4 −0 tests/NuGetGallery.Facts/App.config
  23. +17 −0 tests/NuGetGallery.Facts/Controllers/ApiControllerFacts.cs
  24. +36 −0 tests/NuGetGallery.Facts/Controllers/PackagesControllerFacts.cs
  25. +6 −0 tests/NuGetGallery.Facts/NuGetGallery.Facts.csproj
  26. +1 −1 tests/NuGetGallery.Facts/SearchClient/RetryingHttpClientWrapperFacts.cs
  27. +29 −0 tests/NuGetGallery.Facts/Services/ReflowPackageServiceFacts.cs
  28. +2 −0 tests/NuGetGallery.Facts/packages.config
  29. +2 −2 tests/NuGetGallery.FunctionalTests.Core/EnvironmentSettings.cs
  30. +1 −1 tests/NuGetGallery.FunctionalTests.Core/Helpers/UrlHelper.cs
  31. +9 −0 tests/NuGetGallery.FunctionalTests/Security/HttpToHttpsRedirectTests.cs
  32. +4 −4 tests/Scripts/RunP0Tests.bat
  33. +4 −4 tests/Scripts/RunP1Tests.bat
  34. +4 −4 tests/Scripts/RunP2Tests.bat
@@ -142,7 +142,8 @@ private static void BundlingPostStart()
foreach (string filename in new[] {
"Site.css",
"Layout.css",
- "PageStylings.css"
+ "PageStylings.css",
+ "fabric.css",
})
{
stylesBundle
@@ -21,7 +21,6 @@
using NuGetGallery.Authentication.Providers;
using NuGetGallery.Authentication.Providers.Cookie;
using NuGetGallery.Configuration;
-using NuGetGallery.Helpers;
using NuGetGallery.Infrastructure;
using Owin;
@@ -100,13 +99,13 @@ public static void Configuration(IAppBuilder app)
if (config.Current.RequireSSL)
{
// Put a middleware at the top of the stack to force the user over to SSL
- if (string.IsNullOrWhiteSpace(config.Current.ForceSslExclusion))
+ if (config.Current.ForceSslExclusion == null)
{
app.UseForceSsl(config.Current.SSLPort);
}
else
{
- app.UseForceSsl(config.Current.SSLPort, new[] { config.Current.ForceSslExclusion });
+ app.UseForceSsl(config.Current.SSLPort, config.Current.ForceSslExclusion);
}
}
@@ -16,6 +16,9 @@ public class AppConfiguration : IAppConfiguration
[DefaultValue("")]
public string WarningBanner { get; set; }
+ [DefaultValue("")]
+ public string RedesignBanner { get; set; }
+
/// <summary>
/// Gets a setting indicating if SSL is required for all operations once logged in.
/// </summary>
@@ -29,11 +32,12 @@ public class AppConfiguration : IAppConfiguration
public int SSLPort { get; set; }
/// <summary>
- /// A string containing a path exluded from
- /// forcing the HTTP to HTTPS redirection.
+ /// A string containing a path exluded from forcing the HTTP to HTTPS redirection.
+ /// To provide multiple paths separate them with ;
/// </summary>
- [DefaultValue("")]
- public string ForceSslExclusion { get; set; }
+ [DefaultValue(null)]
+ [TypeConverter(typeof(StringArrayConverter))]
+ public string[] ForceSslExclusion { get; set; }
/// <summary>
/// Gets the connection string to use when connecting to azure storage
@@ -23,6 +23,11 @@ public interface IAppConfiguration
/// </summary>
string WarningBanner { get; set; }
+ /// <summary>
+ /// Gets the warning banner text
+ /// </summary>
+ string RedesignBanner { get; set; }
+
/// <summary>
/// Gets a setting indicating if SSL is required for all operations once logged in.
/// </summary>
@@ -34,11 +39,11 @@ public interface IAppConfiguration
int SSLPort { get; set; }
/// <summary>
- /// A string containing a path exluded from
- /// forcing the HTTP to HTTPS redirection.
+ /// A string containing a path exluded from forcing the HTTP to HTTPS redirection.
+ /// To provide multiple paths separate them with ;
/// </summary>
/// <example>/api/health-probe</example>
- string ForceSslExclusion { get; set; }
+ string[] ForceSslExclusion { get; set; }
/// <summary>
/// Gets the connection string to use when connecting to azure storage
@@ -0,0 +1,34 @@
+// 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.ComponentModel;
+using System.Globalization;
+
+namespace NuGetGallery.Configuration
+{
+ public class StringArrayConverter : ArrayConverter
+ {
+ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
+ {
+ if (sourceType == typeof(string))
+ {
+ return true;
+ }
+
+ return base.CanConvertFrom(context, sourceType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
+ {
+ string s = value as string;
+
+ if (!string.IsNullOrEmpty(s))
+ {
+ return ((string)value).Split(';');
+ }
+
+ return base.ConvertFrom(context, culture, value);
+ }
+ }
+}
@@ -51,6 +51,27 @@ ul.share-buttons i {
text-decoration: underline;
}
+.banner-redesign {
+ padding: 0.25em;
+ text-align: center;
+ color: #FFFFFF;
+ background-color: #004880;
+ font-family: "Segoe UI";
+ font-size: 1.75em;
+ font-weight: 100;
+ line-height: 40px;
+}
+
+ .banner-redesign .ms-Icon {
+ position: relative;
+ top: .1em;
+ font-size: 0.8em;
+ }
+
+ .banner-redesign a {
+ color: white;
+ text-decoration: underline;
+ }
/* Header */
header.main {
Oops, something went wrong.

0 comments on commit c60708d

Please sign in to comment.