From 8c330c6c5ff068b9a9aa6d2d0d0340d60b2fd141 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Tue, 30 May 2023 13:52:04 -1000 Subject: [PATCH] fix null --- .../Authorization/MinimumAgePolicyProvider.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/authorization/AuthRequirementsData/Authorization/MinimumAgePolicyProvider.cs b/security/authorization/AuthRequirementsData/Authorization/MinimumAgePolicyProvider.cs index 8dfa80b..6aa8d8e 100644 --- a/security/authorization/AuthRequirementsData/Authorization/MinimumAgePolicyProvider.cs +++ b/security/authorization/AuthRequirementsData/Authorization/MinimumAgePolicyProvider.cs @@ -29,7 +29,7 @@ class MinimumAgePolicyProvider : IAuthorizationPolicyProvider } public Task GetDefaultPolicyAsync() => FallbackPolicyProvider.GetDefaultPolicyAsync(); - public Task GetFallbackPolicyAsync() => + public Task GetFallbackPolicyAsync() => FallbackPolicyProvider.GetFallbackPolicyAsync(); @@ -37,7 +37,7 @@ class MinimumAgePolicyProvider : IAuthorizationPolicyProvider // to be embedded in the policy names. This is abstracted away from developers // by the more strongly-typed attributes derived from AuthorizeAttribute // (like [MinimumAgeAuthorize()] in this sample) - public Task GetPolicyAsync(string policyName) + public Task GetPolicyAsync(string policyName) { if (policyName.StartsWith(POLICY_PREFIX, StringComparison.OrdinalIgnoreCase) && int.TryParse(policyName.Substring(POLICY_PREFIX.Length), out var age)) @@ -48,7 +48,7 @@ class MinimumAgePolicyProvider : IAuthorizationPolicyProvider return Task.FromResult(policy.Build()); } - return Task.FromResult(null); + return Task.FromResult(null); } }