-
Notifications
You must be signed in to change notification settings - Fork 763
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💔 将OSharp.Permissions拆分为OSharp.Identity和OSharp.Authorization两个项目 #128
💔 同时对原Security中的功能权限和数据权限进行Authorization的迁移 #128
- Loading branch information
Showing
142 changed files
with
1,778 additions
and
1,411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
samples/web/Liuliu.Demo.Core/Authorization/DataAuthManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="DataAuthorizationManager.cs" company="OSharp开源团队"> | ||
// Copyright (c) 2014-2020 OSharp. All rights reserved. | ||
// </copyright> | ||
// <site>http://www.osharp.org</site> | ||
// <last-editor>郭明锋</last-editor> | ||
// <last-date>2020-02-27 0:31</last-date> | ||
// ----------------------------------------------------------------------- | ||
|
||
using System; | ||
|
||
using Liuliu.Demo.Authorization.Dtos; | ||
using Liuliu.Demo.Authorization.Entities; | ||
using Liuliu.Demo.Identity.Entities; | ||
|
||
using OSharp.Authorization.DataAuthorization; | ||
using OSharp.Authorization.Dtos; | ||
using OSharp.Authorization.EntityInfos; | ||
using OSharp.Entity; | ||
using OSharp.EventBuses; | ||
|
||
|
||
namespace Liuliu.Demo.Authorization | ||
{ | ||
/// <summary> | ||
/// 数据权限管理器 | ||
/// </summary> | ||
public class DataAuthManager : DataAuthorizationManagerBase<EntityInfo, EntityInfoInputDto, EntityRole, EntityRoleInputDto, Role, int> | ||
{ | ||
/// <summary> | ||
/// 初始化一个 SecurityManager 类型的新实例 | ||
/// </summary> | ||
/// <param name="eventBus">事件总线</param> | ||
/// <param name="entityInfoRepository">实体仓储</param> | ||
/// <param name="entityRoleRepository">实体角色仓储</param> | ||
/// <param name="roleRepository">角色仓储</param> | ||
protected DataAuthManager(IEventBus eventBus, | ||
IRepository<EntityInfo, Guid> entityInfoRepository, | ||
IRepository<EntityRole, Guid> entityRoleRepository, | ||
IRepository<Role, int> roleRepository) | ||
: base(eventBus, entityInfoRepository, entityRoleRepository, roleRepository) | ||
{ } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
samples/web/Liuliu.Demo.Core/Authorization/DataAuthorizationPack.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="DataAuthorizationPack.cs" company="OSharp开源团队"> | ||
// Copyright (c) 2014-2020 OSharp. All rights reserved. | ||
// </copyright> | ||
// <site>http://www.osharp.org</site> | ||
// <last-editor>郭明锋</last-editor> | ||
// <last-date>2020-02-27 0:35</last-date> | ||
// ----------------------------------------------------------------------- | ||
|
||
using System.ComponentModel; | ||
|
||
using Liuliu.Demo.Authorization.Dtos; | ||
using Liuliu.Demo.Authorization.Entities; | ||
|
||
using OSharp.Authorization; | ||
using OSharp.Authorization.Dtos; | ||
using OSharp.Authorization.EntityInfos; | ||
|
||
|
||
namespace Liuliu.Demo.Authorization | ||
{ | ||
public class DataAuthorizationPack | ||
: DataAuthorizationPackBase<DataAuthManager, DataAuthCache, EntityInfo, EntityInfoInputDto, EntityRole, EntityRoleInputDto, int> | ||
{ } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.