From ff63c7532d5e9a1a9f9a326415cde75c1e9e2cf5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 05:14:12 +0000 Subject: [PATCH 1/4] Initial plan From b8611d9af2f3d61cab1fff04437d894a70a4d925 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 05:24:12 +0000 Subject: [PATCH 2/4] Fix XML comments for IAuthorizationService return values Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> --- .../Core/src/AuthorizationServiceExtensions.cs | 16 ++++++++-------- .../Core/src/IAuthorizationService.cs | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs b/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs index 324d613cf8f5..2bef0508a58e 100644 --- a/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs +++ b/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs @@ -21,8 +21,8 @@ public static class AuthorizationServiceExtensions /// The resource to evaluate the policy against. /// The requirement to evaluate the policy against. /// - /// A flag indicating whether requirement evaluation has succeeded or failed. - /// This value is true when the user fulfills the policy, otherwise false. + /// A that contains an indicating whether requirement evaluation has succeeded or failed. + /// The result's property is true when the user fulfills the policy, otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement) { @@ -40,8 +40,8 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The resource to evaluate the policy against. /// The policy to evaluate. /// - /// A flag indicating whether policy evaluation has succeeded or failed. - /// This value is true when the user fulfills the policy, otherwise false. + /// A that contains an indicating whether policy evaluation has succeeded or failed. + /// The result's property is true when the user fulfills the policy, otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy) { @@ -58,8 +58,8 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The user to evaluate the policy against. /// The policy to evaluate. /// - /// A flag indicating whether policy evaluation has succeeded or failed. - /// This value is true when the user fulfills the policy, otherwise false. + /// A that contains an indicating whether policy evaluation has succeeded or failed. + /// The result's property is true when the user fulfills the policy, otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy) { @@ -76,8 +76,8 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The user to evaluate the policy against. /// The name of the policy to evaluate. /// - /// A flag indicating whether policy evaluation has succeeded or failed. - /// This value is true when the user fulfills the policy, otherwise false. + /// A that contains an indicating whether policy evaluation has succeeded or failed. + /// The result's property is true when the user fulfills the policy, otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName) { diff --git a/src/Security/Authorization/Core/src/IAuthorizationService.cs b/src/Security/Authorization/Core/src/IAuthorizationService.cs index 64ac3b5cd514..5c612869d4de 100644 --- a/src/Security/Authorization/Core/src/IAuthorizationService.cs +++ b/src/Security/Authorization/Core/src/IAuthorizationService.cs @@ -22,8 +22,8 @@ public interface IAuthorizationService /// /// The requirements to evaluate. /// - /// A flag indicating whether authorization has succeeded. - /// This value is true when the user fulfills the policy; otherwise false. + /// A that contains an indicating whether authorization has succeeded. + /// The result's property is true when the user fulfills the policy; otherwise false. /// /// /// Resource is an optional parameter and may be null. Please ensure that you check it is not @@ -41,9 +41,8 @@ public interface IAuthorizationService /// /// The name of the policy to check against a specific context. /// - /// A flag indicating whether authorization has succeeded. - /// Returns a flag indicating whether the user, and optional resource has fulfilled the policy. - /// true when the policy has been fulfilled; otherwise false. + /// A that contains an indicating whether authorization has succeeded. + /// The result's property is true when the policy has been fulfilled; otherwise false. /// /// /// Resource is an optional parameter and may be null. Please ensure that you check it is not From e5260c8c5b7c49196988385b2e95da5a48a09161 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 17 Jul 2025 05:37:43 +0000 Subject: [PATCH 3/4] Update XML comments for DefaultAuthorizationService return values Updated XML documentation for DefaultAuthorizationService methods to correctly describe return values as Task instead of boolean flags, matching the pattern used for IAuthorizationService interface. Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> --- .../Authorization/Core/src/DefaultAuthorizationService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Security/Authorization/Core/src/DefaultAuthorizationService.cs b/src/Security/Authorization/Core/src/DefaultAuthorizationService.cs index 1a9474634485..0a1b4c37b382 100644 --- a/src/Security/Authorization/Core/src/DefaultAuthorizationService.cs +++ b/src/Security/Authorization/Core/src/DefaultAuthorizationService.cs @@ -56,8 +56,8 @@ public DefaultAuthorizationService(IAuthorizationPolicyProvider policyProvider, /// The resource to evaluate the requirements against. /// The requirements to evaluate. /// - /// A flag indicating whether authorization has succeeded. - /// This value is true when the user fulfills the policy, otherwise false. + /// A that contains an indicating whether authorization has succeeded. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public virtual async Task AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable requirements) { @@ -93,8 +93,8 @@ public virtual async Task AuthorizeAsync(ClaimsPrincipal us /// The resource the policy should be checked with. /// The name of the policy to check against a specific context. /// - /// A flag indicating whether authorization has succeeded. - /// This value is true when the user fulfills the policy otherwise false. + /// A that contains an indicating whether authorization has succeeded. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public virtual async Task AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName) { From 18ea4790e52d239dd48c2a12d667783fd7f5b9e7 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 24 Jul 2025 14:15:57 +0800 Subject: [PATCH 4/4] Apply suggestions from code review --- .../Core/src/AuthorizationServiceExtensions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs b/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs index 2bef0508a58e..47d381136f25 100644 --- a/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs +++ b/src/Security/Authorization/Core/src/AuthorizationServiceExtensions.cs @@ -22,7 +22,7 @@ public static class AuthorizationServiceExtensions /// The requirement to evaluate the policy against. /// /// A that contains an indicating whether requirement evaluation has succeeded or failed. - /// The result's property is true when the user fulfills the policy, otherwise false. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement) { @@ -41,7 +41,7 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The policy to evaluate. /// /// A that contains an indicating whether policy evaluation has succeeded or failed. - /// The result's property is true when the user fulfills the policy, otherwise false. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy) { @@ -59,7 +59,7 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The policy to evaluate. /// /// A that contains an indicating whether policy evaluation has succeeded or failed. - /// The result's property is true when the user fulfills the policy, otherwise false. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy) { @@ -77,7 +77,7 @@ public static Task AuthorizeAsync(this IAuthorizationServic /// The name of the policy to evaluate. /// /// A that contains an indicating whether policy evaluation has succeeded or failed. - /// The result's property is true when the user fulfills the policy, otherwise false. + /// The result's property is true when the user fulfills the policy; otherwise false. /// public static Task AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy