Permissions & Authorization for Users #24

Initial Release; Includes Database and MVC refactoring
This commit is contained in:
Gary Sharp
2013-10-10 19:13:16 +11:00
parent 172ce5524a
commit a099d68915
458 changed files with 40221 additions and 12130 deletions
+7 -5
View File
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.18051
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Search
using System.Web.WebPages;
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Search/Query.cshtml")]
public partial class Query : System.Web.Mvc.WebViewPage<Disco.Web.Models.Search.QueryModel>
public partial class Query : Disco.Services.Web.WebViewPage<Disco.Web.Models.Search.QueryModel>
{
public Query()
{
@@ -67,7 +69,7 @@ WriteLiteral("</span>\'</h2>\r\n");
#line 7 "..\..\Views\Search\Query.cshtml"
if (Model.Success)
{
if (Model.Jobs != null)
if (Model.Jobs != null && Authorization.Has(Claims.Job.Search))
{
@@ -91,7 +93,7 @@ WriteLiteral("\r\n </div>\r\n");
#line 16 "..\..\Views\Search\Query.cshtml"
}
if (Model.Devices != null)
if (Model.Devices != null && Authorization.Has(Claims.Device.Search))
{
@@ -115,7 +117,7 @@ WriteLiteral("\r\n </div>\r\n");
#line 24 "..\..\Views\Search\Query.cshtml"
}
if (Model.Users != null)
if (Model.Users != null && Authorization.Has(Claims.User.Search))
{