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.
This commit is contained in:
Gary Sharp
2014-02-14 21:16:17 +11:00
parent 7027b33fe2
commit ed7caf8b4a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -129,7 +129,7 @@
<h2>My Jobs (@Model.MyJobs.Items.Count())</h2> <h2>My Jobs (@Model.MyJobs.Items.Count())</h2>
@Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDictionary()) @Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDictionary())
} }
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) @if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{ {
<h2>Stale Jobs (@Model.StaleJobs.Items.Count())</h2> <h2>Stale Jobs (@Model.StaleJobs.Items.Count())</h2>
@Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary()) @Html.Partial(MVC.Shared.Views._JobTable, Model.StaleJobs, new ViewDataDictionary())
+2 -2
View File
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -260,7 +260,7 @@ Write(Html.Partial(MVC.Shared.Views._JobTable, Model.MyJobs, new ViewDataDiction
#line hidden #line hidden
#line 132 "..\..\Views\Job\Index.cshtml" #line 132 "..\..\Views\Job\Index.cshtml"
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs)) if (Authorization.Has(Claims.Job.Lists.StaleJobs))
{ {