全面修正分级授权,去掉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

@@ -4,6 +4,7 @@ using System.Web.Mvc;
using Infrastructure;
using OpenAuth.App;
using OpenAuth.Domain;
using OpenAuth.Mvc.Models;
namespace OpenAuth.Mvc.Controllers
{
@@ -18,6 +19,7 @@ namespace OpenAuth.Mvc.Controllers
//
// GET: /UserManager/
[Authenticate]
public ActionResult Index()
{
return View();
@@ -33,16 +35,7 @@ namespace OpenAuth.Mvc.Controllers
public string LoadForTree()
{
var models = _app.LoadAll();
//添加根节点
models.Add(new Category
{
Id = 0,
ParentId = -1,
Name = "根结点",
CascadeId = "0"
});
return JsonHelper.Instance.Serialize(models);
return JsonHelper.Instance.Serialize(_app.LoadAll());
}
//添加或修改Category