mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-10 11:24:45 +08:00
完成分配菜单
This commit is contained in:
@@ -118,6 +118,28 @@ namespace OpenAuth.Mvc.Controllers
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载用户模块
|
||||
/// </summary>
|
||||
/// <param name="firstId">The user identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadForUser(Guid firstId)
|
||||
{
|
||||
var orgs = _app.LoadForUser(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载角色模块
|
||||
/// </summary>
|
||||
/// <param name="firstId">The role identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public string LoadForRole(Guid firstId)
|
||||
{
|
||||
var orgs = _app.LoadForRole(firstId);
|
||||
return JsonHelper.Instance.Serialize(orgs);
|
||||
}
|
||||
|
||||
public string LoadModuleWithRoot()
|
||||
{
|
||||
var orgs = AuthUtil.GetCurrentUser().Modules.MapToList<ModuleView>();
|
||||
|
||||
Reference in New Issue
Block a user