-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify DefaultPolicy and FallbackPolicy Behavior in XML Docs #60619
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Security/Authorization/Core/src/AuthorizationOptions.cs:30
- [nitpick] Consider using XML elements instead of backticks to mark inline code (e.g., policy names) for improved clarity in XML documentation.
/// - The `DefaultPolicy` applies whenever authorization is required, but no specific policy is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks like a big improvement.
Part of me wanted to continue to cross-reference IAuthorizeData
for completeness, but most consumers of the API won't have any familiarity with that and are better served by the new mentions to [Authorize]
and RequireAuthorization()
.
Comments. fix. Co-authored-by: Stephen Halter <halter73@gmail.com>
Hi @halter73, Than you for all suggestions. I have committed them. Could you please re-approve and merge? |
Thank you! |
Description
This PR updates the XML documentation for
DefaultPolicy
andFallbackPolicy
in theAuthorizationPolicy
class to provide clearer explanations of when each policy applies.Changes:
FallbackPolicy:
[Authorize]
attributes orRequireAuthorization()
calls).[Authorize]
attribute is present without a policy name.DefaultPolicy:
[Authorize]
attribute without a policy name will always use DefaultPolicy instead of FallbackPolicy.Why This Change?
[Authorize]
without a policy name.Fixes #60452