// *********************************************************************** // Assembly : OpenAuth.Domain // Author : yubaolee // Created : 04-21-2016 // // Last Modified By : yubaolee // Last Modified On : 04-21-2016 // Contact : Microsoft // File: AuthenService.cs // *********************************************************************** using System; using System.Linq; using OpenAuth.Repository.Domain; namespace OpenAuth.App { /// /// 领域服务 /// 超级管理员权限 /// todo:超级管理员使用guid.empty为ID,可以根据需要修改 /// public class SystemAuthService : AuthoriseService { public SystemAuthService() { _user = new User { Account = "System", Name = "超级管理员", Id = Guid.Empty.ToString() }; } public override IQueryable GetOrgsQuery() { return UnitWork.Find(null); } public override IQueryable GetResourcesQuery() { return UnitWork.Find(null); } public override IQueryable GetModuleElementsQuery() { return UnitWork.Find(null); } public override IQueryable GetModulesQuery() { return UnitWork.Find(null); } public override IQueryable GetRolesQuery() { //用户角色 return UnitWork.Find(null); } } }