From ed7caf8b4a370b38ea2553331a3ea494ac5eee83 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Fri, 14 Feb 2014 21:16:17 +1100 Subject: [PATCH] Bug Fix: Job Index Authorization Check The LongRunningJobs claim is checked instead of the StaleJobs claim which resulted in an NullReferenceException for users without StaleJobs authorization. --- Disco.Web/Views/Job/Index.cshtml | 2 +- Disco.Web/Views/Job/Index.generated.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Disco.Web/Views/Job/Index.cshtml b/Disco.Web/Views/Job/Index.cshtml index 2cec386e..bafa7d7e 100644 --- a/Disco.Web/Views/Job/Index.cshtml +++ b/Disco.Web/Views/Job/Index.cshtml @@ -129,7 +129,7 @@

My Jobs (@Model.MyJobs.Items.Count())

@Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDictionary()) } -@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) +@if (Authorization.Has(Claims.Job.Lists.StaleJobs)) {

Stale Jobs (@Model.StaleJobs.Items.Count())

@Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary()) diff --git a/Disco.Web/Views/Job/Index.generated.cs b/Disco.Web/Views/Job/Index.generated.cs index d76fb527..f011ddd9 100644 --- a/Disco.Web/Views/Job/Index.generated.cs +++ b/Disco.Web/Views/Job/Index.generated.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34003 +// Runtime Version:4.0.30319.34011 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -260,7 +260,7 @@ Write(Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDiction #line hidden #line 132 "..\..\Views\Job\Index.cshtml" - if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) + if (Authorization.Has(Claims.Job.Lists.StaleJobs)) {