Browse Source
Refactor GetPermissionsAsync method to return MultiplePermissionGrantResult instead of IDictionary
pull/24374/head
maliming
11 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
3 additions and
4 deletions
-
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/Resources/IResourcePermissionStore.cs
-
framework/src/Volo.Abp.Authorization.Abstractions/Volo/Abp/Authorization/Permissions/Resources/NullResourcePermissionStore.cs
|
|
|
@ -51,7 +51,7 @@ public interface IResourcePermissionStore |
|
|
|
/// <returns>
|
|
|
|
/// A dictionary of permission names and their states.
|
|
|
|
/// </returns>
|
|
|
|
Task<IDictionary<string, bool>> GetPermissionsAsync( |
|
|
|
Task<MultiplePermissionGrantResult> GetPermissionsAsync( |
|
|
|
string resourceName, |
|
|
|
string resourceKey |
|
|
|
); |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Microsoft.Extensions.Logging.Abstractions; |
|
|
|
@ -27,9 +26,9 @@ public class NullResourcePermissionStore : IResourcePermissionStore, ISingletonD |
|
|
|
return Task.FromResult(new MultiplePermissionGrantResult(names, PermissionGrantResult.Prohibited)); |
|
|
|
} |
|
|
|
|
|
|
|
public Task<IDictionary<string, bool>> GetPermissionsAsync(string resourceName, string resourceKey) |
|
|
|
public Task<MultiplePermissionGrantResult> GetPermissionsAsync(string resourceName, string resourceKey) |
|
|
|
{ |
|
|
|
return Task.FromResult((IDictionary<string, bool>)new Dictionary<string, bool>()); |
|
|
|
return Task.FromResult(new MultiplePermissionGrantResult()); |
|
|
|
} |
|
|
|
|
|
|
|
public Task<string[]> GetGrantedPermissionsAsync(string resourceName, string resourceKey) |
|
|
|
|