v1.1 实现用户分级授权,得到权限的用户只能在自己的权限范围内再进一步操作

This commit is contained in:
yubaolee
2016-05-27 00:58:36 +08:00
parent ef6a274ac6
commit fbdd6163a2
10 changed files with 174 additions and 131 deletions

View File

@@ -46,7 +46,7 @@ namespace OpenAuth.Mvc.Controllers
/// </summary>
public string Load(int categoryId, int pageCurrent = 1, int pageSize = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(categoryId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(User.Identity.Name, categoryId, pageCurrent, pageSize));
}
public string LoadForTree()
@@ -94,7 +94,7 @@ namespace OpenAuth.Mvc.Controllers
/// <returns>System.String.</returns>
public string LoadWithAccess(int cId, int firstId, string key)
{
return JsonHelper.Instance.Serialize(_app.LoadWithAccess(key,firstId, cId));
return JsonHelper.Instance.Serialize(_app.LoadWithAccess(User.Identity.Name,key,firstId, cId));
}
}
}