Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user