From 1921387b56965f73f4a2dca79a8c9011d7a83851 Mon Sep 17 00:00:00 2001 From: Yishai Galatzer Date: Thu, 3 Apr 2014 17:29:37 -0700 Subject: [PATCH] Fix #198 --- src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs index a842ee03ec..242583262a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs @@ -100,9 +100,9 @@ namespace Microsoft.AspNet.Mvc await authZPipeline.InvokeAsync(); - if (authZContext.ActionResult == null && - !authZContext.HasFailed && - authZEndPoint.WasEndPointCalled) + if (authZContext.ActionResult != null || + authZContext.HasFailed || + !authZEndPoint.WasEndPointCalled) { // User cleaned out the result but we failed or short circuited the end point. return authZContext.ActionResult ?? new HttpStatusCodeResult(401);