Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.User.UserParts
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
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/User/UserParts/_Authorization.cshtml")]
|
||||
public partial class Authorization : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Authorization()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowAuthorization);
|
||||
|
||||
Html.BundleDeferred("~/Style/Fancytree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-Authorization\"");
|
||||
|
||||
WriteLiteral(" class=\"UserPart\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-AuthorizationContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
if (Model.ClaimNavigator != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Claims_Tree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n (function(){\r\n " +
|
||||
" var claimNodes = ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
Write(new HtmlString(Newtonsoft.Json.JsonConvert.SerializeObject(Model.ClaimNavigatorFancyTreeNodes)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@";
|
||||
|
||||
$(function(){
|
||||
var tree = $('#Config_AuthRoles_Claims_Tree').fancytree({
|
||||
source: claimNodes,
|
||||
checkbox: true,
|
||||
selectMode: 3
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>NO ACCESS</div>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n </div>\r\n <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a hre" +
|
||||
"f=\"#UserDetailTab-Authorization\">Authorization</a></li>\');\r\n </script>\r\n</div" +
|
||||
">");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Reference in New Issue
Block a user