mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-19 06:36:29 +08:00
完成所有主列表JS模块化
This commit is contained in:
@@ -55,11 +55,20 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前登录用户可访问到的部门
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadForTree()
|
||||
{
|
||||
var orgs = SessionHelper.GetSessionUser<LoginUserVM>().AccessedOrgs;
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
}
|
||||
/// <summary>
|
||||
/// 返回带有根节点的全部部门,不受用户权限影响
|
||||
/// <para>可以匿名访问</para>
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
[Anonymous]
|
||||
public string LoadOrg()
|
||||
{
|
||||
@@ -150,21 +159,6 @@ namespace OpenAuth.Mvc.Controllers
|
||||
}
|
||||
return JsonHelper.Instance.Serialize(BjuiResponse);
|
||||
}
|
||||
|
||||
public string EditOrg(string json)
|
||||
{
|
||||
try
|
||||
{
|
||||
var org = JsonHelper.Instance.Deserialize<Org>(json);
|
||||
_orgApp.AddOrUpdate(org);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BjuiResponse.statusCode = "300";
|
||||
BjuiResponse.message = ex.Message;
|
||||
}
|
||||
return JsonHelper.Instance.Serialize(BjuiResponse);
|
||||
}
|
||||
|
||||
public string LoadChildren(int id)
|
||||
{
|
||||
|
||||
@@ -23,11 +23,6 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Add(int id = 0)
|
||||
{
|
||||
return View(_app.Find(id));
|
||||
}
|
||||
|
||||
//添加或修改Resource
|
||||
[HttpPost]
|
||||
public string Add(Resource model)
|
||||
|
||||
@@ -23,11 +23,6 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Add(int id = 0)
|
||||
{
|
||||
return View(_app.Find(id));
|
||||
}
|
||||
|
||||
//添加或修改组织
|
||||
[HttpPost]
|
||||
public string Add(UserView view)
|
||||
|
||||
Reference in New Issue
Block a user