From 88b8f6ed836f2675ad562c27cb759ee20848d824 Mon Sep 17 00:00:00 2001 From: maliming Date: Wed, 4 Mar 2020 09:18:39 +0800 Subject: [PATCH] Check if authorizationPolicy is null. --- .../Authorization/MethodInvocationAuthorizationService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs index 32fd611b9a..6293c0d034 100644 --- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs +++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/MethodInvocationAuthorizationService.cs @@ -29,6 +29,11 @@ namespace Volo.Abp.Authorization var authorizationPolicy = await AuthorizationPolicy.CombineAsync(_abpAuthorizationPolicyProvider, GetAuthorizationDataAttributes(context.Method)); + if (authorizationPolicy == null) + { + return; + } + await _abpAuthorizationService.CheckAsync(authorizationPolicy); }