OpenAuth.Net/OpenAuth.App/SystemAuthService.cs
yubao e5f911079f 4.0发布前最后一般脚本;
优化登陆;
优化流程审批;
2018-04-07 00:36:26 +08:00

63 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ***********************************************************************
// 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
{
/// <summary>
/// 领域服务
/// <para>超级管理员权限</para>
/// <para>todo:超级管理员使用guid.empty为ID可以根据需要修改</para>
/// </summary>
public class SystemAuthService : AuthoriseService
{
public SystemAuthService()
{
_user = new User
{
Account = "System",
Name = "超级管理员",
Id = Guid.Empty.ToString()
};
}
public override IQueryable<Org> GetOrgsQuery()
{
return UnitWork.Find<Org>(null);
}
public override IQueryable<Resource> GetResourcesQuery()
{
return UnitWork.Find<Resource>(null);
}
public override IQueryable<ModuleElement> GetModuleElementsQuery()
{
return UnitWork.Find<ModuleElement>(null);
}
public override IQueryable<Module> GetModulesQuery()
{
return UnitWork.Find<Module>(null);
}
public override IQueryable<Role> GetRolesQuery()
{
//用户角色
return UnitWork.Find<Role>(null);
}
}
}