mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-22 12:09:19 +08:00
全面修正分级授权,去掉Anonymous,采用Authenticate进行授权
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user