This commit is contained in:
Yishai Galatzer 2014-04-03 17:29:37 -07:00
parent 9291cbc50b
commit 1921387b56
1 changed files with 3 additions and 3 deletions

View File

@ -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);