mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-11 08:08:02 +08:00
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using OpenAuth.Repository.Domain;
|
|
|
|
namespace OpenAuth.App
|
|
{
|
|
public class ModuleManagerApp :BaseApp<Module>
|
|
{
|
|
public void Add(Module model)
|
|
{
|
|
ChangeModuleCascade(model);
|
|
Repository.Add(model);
|
|
}
|
|
|
|
public void Update(Module model)
|
|
{
|
|
ChangeModuleCascade(model);
|
|
Repository.Update(u =>u.Id, model);
|
|
}
|
|
|
|
#region 用户/角色分配模块
|
|
|
|
/// <summary>
|
|
/// 加载特定用户的模块
|
|
/// TODO:这里会加载用户及用户角色的所有模块,“为用户分配模块”功能会给人一种混乱的感觉,但可以接受
|
|
/// </summary>
|
|
/// <param name="userId">The user unique identifier.</param>
|
|
public List<Module> LoadForUser(string userId)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 加载特定角色的模块
|
|
/// </summary>
|
|
/// <param name="roleId">The role unique identifier.</param>
|
|
public List<Module> LoadForRole(string roleId)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
#endregion 用户/角色分配模块
|
|
}
|
|
} |