Browse Source
Refactor permission retrieval methods and clean up unused model validation in ResourcePermissionManagementModal
pull/24374/head
maliming
11 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
2 additions and
6 deletions
-
modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/DynamicPermissionDefinitionStore.cs
-
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/ResourcePermissionManagementModal.cshtml.cs
|
|
@ -82,7 +82,7 @@ public class DynamicPermissionDefinitionStore : IDynamicPermissionDefinitionStor |
|
|
using (await StoreCache.SyncSemaphore.LockAsync()) |
|
|
using (await StoreCache.SyncSemaphore.LockAsync()) |
|
|
{ |
|
|
{ |
|
|
await EnsureCacheIsUptoDateAsync(); |
|
|
await EnsureCacheIsUptoDateAsync(); |
|
|
return StoreCache.GetPermissionOrNull(name); |
|
|
return StoreCache.GetResourcePermissionOrNull(name); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -96,7 +96,7 @@ public class DynamicPermissionDefinitionStore : IDynamicPermissionDefinitionStor |
|
|
using (await StoreCache.SyncSemaphore.LockAsync()) |
|
|
using (await StoreCache.SyncSemaphore.LockAsync()) |
|
|
{ |
|
|
{ |
|
|
await EnsureCacheIsUptoDateAsync(); |
|
|
await EnsureCacheIsUptoDateAsync(); |
|
|
return StoreCache.GetPermissions().ToImmutableList(); |
|
|
return StoreCache.GetResourcePermissions().ToImmutableList(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -35,15 +35,11 @@ public class ResourcePermissionManagementModal : AbpPageModel |
|
|
|
|
|
|
|
|
public virtual Task<IActionResult> OnGetAsync() |
|
|
public virtual Task<IActionResult> OnGetAsync() |
|
|
{ |
|
|
{ |
|
|
ValidateModel(); |
|
|
|
|
|
return Task.FromResult<IActionResult>(Page()); |
|
|
return Task.FromResult<IActionResult>(Page()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual async Task<IActionResult> OnPostAsync() |
|
|
public virtual async Task<IActionResult> OnPostAsync() |
|
|
{ |
|
|
{ |
|
|
ValidateModel(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return NoContent(); |
|
|
return NoContent(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|