introduce AlwaysAllowMethodInvocationAuthorizationService.

Resolve #2874
pull/2875/head
maliming 5 years ago
parent 5460d79f1c
commit 0b74af6f90

@ -11,6 +11,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
services.Replace(ServiceDescriptor.Singleton<IAuthorizationService, AlwaysAllowAuthorizationService>());
services.Replace(ServiceDescriptor.Singleton<IAbpAuthorizationService, AlwaysAllowAuthorizationService>());
services.Replace(ServiceDescriptor.Singleton<IMethodInvocationAuthorizationService, AlwaysAllowMethodInvocationAuthorizationService>());
return services.Replace(ServiceDescriptor.Singleton<IPermissionChecker, AlwaysAllowPermissionChecker>());
}
}

@ -0,0 +1,12 @@
using System.Threading.Tasks;
namespace Volo.Abp.Authorization
{
public class AlwaysAllowMethodInvocationAuthorizationService : IMethodInvocationAuthorizationService
{
public Task CheckAsync(MethodInvocationAuthorizationContext context)
{
return Task.CompletedTask;
}
}
}
Loading…
Cancel
Save