全面修正分级授权,去掉Anonymous,采用Authenticate进行授权

This commit is contained in:
yubaolee
2016-05-26 20:10:22 +08:00
parent b3c6df2931
commit 855f97df7d
24 changed files with 227 additions and 244 deletions

View File

@@ -6,6 +6,7 @@ using System.Linq;
using System.Web.Mvc;
using Infrastructure.Helper;
using OpenAuth.App.ViewModel;
using OpenAuth.Mvc.Models;
namespace OpenAuth.Mvc.Controllers
{
@@ -18,8 +19,8 @@ namespace OpenAuth.Mvc.Controllers
_app = AutofacExt.GetFromFac<ModuleManagerApp>();
}
//
// GET: /ModuleManager/
[Authenticate]
public ActionResult Index()
{
return View();
@@ -52,14 +53,6 @@ namespace OpenAuth.Mvc.Controllers
public string LoadModuleWithRoot()
{
var orgs = AutofacExt.GetFromFac<LoginApp>().GetLoginUser().Modules.MapToList<ModuleView>();
//添加根节点
orgs.Add(new Module
{
Id = 0,
ParentId = -1,
Name = "根节点",
CascadeId = "0"
});
return JsonHelper.Instance.Serialize(orgs);
}