Skip to content

Commit

Permalink
Changes admin menu so that it is displayed on status codes other than…
Browse files Browse the repository at this point in the history
… 3xx (#1079)
  • Loading branch information
Chris Payne authored and sebastienros committed Oct 10, 2017
1 parent a32f02a commit 4c23b78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/OrchardCore.Modules/OrchardCore.Admin/AdminMenuFilter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using OrchardCore.DisplayManagement;
using OrchardCore.DisplayManagement.Layout;
Expand Down Expand Up @@ -36,7 +36,9 @@ public void OnResultExecuting(ResultExecutingContext filterContext)
return;
}

if (filterContext.HttpContext.Response.StatusCode != 200)
// Don't create the menu if the status code is 3xx
var statusCode = filterContext.HttpContext.Response.StatusCode;
if (statusCode >= 300 && statusCode < 400)
{
return;
}
Expand Down

0 comments on commit 4c23b78

Please sign in to comment.