This action will force synchronization from dotNET China/OpenAuth.Net, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
using System;using Infrastructure;using OpenAuth.Domain;using System.Collections.Generic;using System.Web;using OpenAuth.App.SSO;using OpenAuth.Domain.Service;namespace OpenAuth.App{public class ModuleManagerApp{private ModuleManService _moduleManService;public ModuleManagerApp(ModuleManService moduleManService){_moduleManService = moduleManService;}/// <summary>/// 加载一个节点下面的所有/// </summary>public dynamic Load(Guid parentId, int pageindex, int pagesize){return _moduleManService.Load(AuthUtil.GetUserName(), parentId, pageindex, pagesize);}public void Delete(Guid id){_moduleManService.Delete(id);}public void AddOrUpdate(Module vm){Module model = new Module();vm.CopyTo(model); //copy一次,防止成员为null的情况_moduleManService.AddOrUpdate(model);}#region 用户/角色分配模块/// <summary>/// 加载特定用户的模块/// TODO:这里会加载用户及用户角色的所有模块,"为用户分配模块"功能会给人一种混乱的感觉,但可以接受/// </summary>/// <param name="userId">The user unique identifier.</param>public List<Module> LoadForUser(Guid userId){return _moduleManService.LoadForUser(userId);}/// <summary>/// 加载特定角色的模块/// </summary>/// <param name="roleId">The role unique identifier.</param>public List<Module> LoadForRole(Guid roleId){return _moduleManService.LoadForRole(roleId);}#endregion 用户/角色分配模块}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。