Browse Source
Merge pull request #6984 from abpframework/liangshiwei/identity-patch-1
Comment RoleDeletedEventHandler
pull/6986/head
maliming
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
16 additions and
16 deletions
-
modules/identity/src/Volo.Abp.PermissionManagement.Domain.Identity/Volo/Abp/PermissionManagement/Identity/RoleDeletedEventHandler.cs
|
|
|
@ -7,20 +7,20 @@ using Volo.Abp.Identity; |
|
|
|
|
|
|
|
namespace Volo.Abp.PermissionManagement.Identity |
|
|
|
{ |
|
|
|
public class RoleDeletedEventHandler : |
|
|
|
ILocalEventHandler<EntityDeletedEventData<IdentityRole>>, |
|
|
|
ITransientDependency |
|
|
|
{ |
|
|
|
protected IPermissionManager PermissionManager { get; } |
|
|
|
|
|
|
|
public RoleDeletedEventHandler(IPermissionManager permissionManager) |
|
|
|
{ |
|
|
|
PermissionManager = permissionManager; |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task HandleEventAsync(EntityDeletedEventData<IdentityRole> eventData) |
|
|
|
{ |
|
|
|
await PermissionManager.DeleteAsync(RolePermissionValueProvider.ProviderName, eventData.Entity.Name); |
|
|
|
} |
|
|
|
} |
|
|
|
// public class RoleDeletedEventHandler :
|
|
|
|
// ILocalEventHandler<EntityDeletedEventData<IdentityRole>>,
|
|
|
|
// ITransientDependency
|
|
|
|
// {
|
|
|
|
// protected IPermissionManager PermissionManager { get; }
|
|
|
|
//
|
|
|
|
// public RoleDeletedEventHandler(IPermissionManager permissionManager)
|
|
|
|
// {
|
|
|
|
// PermissionManager = permissionManager;
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// public virtual async Task HandleEventAsync(EntityDeletedEventData<IdentityRole> eventData)
|
|
|
|
// {
|
|
|
|
// await PermissionManager.DeleteAsync(RolePermissionValueProvider.ProviderName, eventData.Entity.Name);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|