Browse Source
Grant TestEntityManagementPermission in FakePermissionStore
pull/24374/head
maliming
2 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
2 additions and
2 deletions
-
framework/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/TestServices/FakePermissionStore.cs
|
|
|
@ -8,7 +8,7 @@ public class FakePermissionStore : IPermissionStore, ITransientDependency |
|
|
|
{ |
|
|
|
public Task<bool> IsGrantedAsync(string name, string providerName, string providerKey) |
|
|
|
{ |
|
|
|
return Task.FromResult(name == "MyPermission3" || name == "MyPermission5"); |
|
|
|
return Task.FromResult(name == "MyPermission3" || name == "MyPermission5" || name == "TestEntityManagementPermission"); |
|
|
|
} |
|
|
|
|
|
|
|
public Task<MultiplePermissionGrantResult> IsGrantedAsync(string[] names, string providerName, string providerKey) |
|
|
|
@ -16,7 +16,7 @@ public class FakePermissionStore : IPermissionStore, ITransientDependency |
|
|
|
var result = new MultiplePermissionGrantResult(); |
|
|
|
foreach (var name in names) |
|
|
|
{ |
|
|
|
result.Result.Add(name, name == "MyPermission3" || name == "MyPermission5" |
|
|
|
result.Result.Add(name, name == "MyPermission3" || name == "MyPermission5" || name == "TestEntityManagementPermission" |
|
|
|
? PermissionGrantResult.Granted |
|
|
|
: PermissionGrantResult.Prohibited); |
|
|
|
} |
|
|
|
|