Skip to content

Resource-based authz article overhaul#37097

Open
guardrex wants to merge 7 commits intomainfrom
guardrex/resource-based-authz-overhaul
Open

Resource-based authz article overhaul#37097
guardrex wants to merge 7 commits intomainfrom
guardrex/resource-based-authz-overhaul

Conversation

@guardrex
Copy link
Copy Markdown
Collaborator

@guardrex guardrex commented May 4, 2026

Fixes #35818

Notes

  • I rewrote the introductory remarks.
  • The MVC and RP versions of the article remain mostly unchanged with minor updates here and there.
  • The revamped main article, which now adopts Razor component/Blazor examples, is fleshed out with a bit more code and details to make concepts clearer. Also, the examples are less hacked. For example, the sample app actually has mock, seeded documents. I think that we're ok to focus the most significant upgrades in coverage on the main article.
  • WRT the MVC and RP code examples and sample app, I leave most of the code examples pulled from the MVC/RP sample apps. I've temporarily left some links the code inlined in the article text. I'll pull the HTML comments before merging this. I don't think we should provide a new MVC/RP sample. It seems unlikely that this code will change, and creating yet another sample seems like 💸. However, let me know if you want me to do that, and I'll get right on it.
  • The Blazor sample is here 👉 https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/security/authorization/BlazorWebAppAuthorization.

NOTE TO SELF 🦖

Kill the MVC/RP samples living in the docs repo before merging this PR. They were moved to the samples repo 👉 https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/security/authorization/resource-based.


Internal previews

📄 File 🔗 Preview link
aspnetcore/mvc/security/authorization/resource-based.md aspnetcore/mvc/security/authorization/resource-based
aspnetcore/razor-pages/security/authorization/resource-based.md aspnetcore/razor-pages/security/authorization/resource-based
aspnetcore/security/authentication/index.md aspnetcore/security/authentication/index
aspnetcore/security/authorization/resource-based.md aspnetcore/security/authorization/resource-based
aspnetcore/security/authorization/views.md aspnetcore/security/authorization/views
aspnetcore/signalr/authn-and-authz.md aspnetcore/signalr/authn-and-authz
aspnetcore/toc.yml aspnetcore/toc

@guardrex guardrex changed the title Guardrex/resource based authz overhaul Resource-based authz article overhaul May 4, 2026
@guardrex guardrex self-assigned this May 4, 2026
@guardrex guardrex marked this pull request as ready for review May 5, 2026 14:57
@guardrex guardrex requested a review from Copilot May 5, 2026 15:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames and restructures the resource-based authorization documentation so the main article targets Blazor/Razor component scenarios, while adding separate MVC and Razor Pages companion articles and updating repo links/navigation to the new UID/path.

Changes:

  • Replaced the old general resource-based authorization article with a new resource-based.md article focused on Blazor examples.
  • Added new MVC and Razor Pages resource-based authorization articles and surfaced them in the TOC.
  • Updated inbound links and added a redirection from the old resourcebased.md path.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
aspnetcore/toc.yml Adds TOC entries for the new MVC/Razor Pages articles and updates the main authorization article UID.
aspnetcore/signalr/authn-and-authz.md Updates related-resource links to the renamed resource-based authorization article.
aspnetcore/security/authorization/views.md Updates imperative-authorization links to the renamed article and new section anchor.
aspnetcore/security/authorization/resourcebased.md Deletes the old resource-based authorization article.
aspnetcore/security/authorization/resource-based.md Adds the new main resource-based authorization article focused on Blazor scenarios.
aspnetcore/security/authentication/index.md Repoints challenge/forbid references to the renamed resource-based authorization article.
aspnetcore/razor-pages/security/authorization/resource-based.md Adds the new Razor Pages-specific resource-based authorization article.
aspnetcore/mvc/security/authorization/resource-based.md Adds the new MVC-specific resource-based authorization article.
.openpublishing.redirection.json Adds a redirect from the old article path to the new one.

Comment thread aspnetcore/security/authentication/index.md Outdated
Comment thread aspnetcore/security/authentication/index.md Outdated
Comment thread aspnetcore/security/authentication/index.md Outdated
Comment thread aspnetcore/security/authorization/resource-based.md Outdated
Comment thread aspnetcore/security/authorization/resource-based.md Outdated
Comment thread aspnetcore/mvc/security/authorization/resource-based.md Outdated
Comment thread aspnetcore/mvc/security/authorization/resource-based.md
Comment thread aspnetcore/mvc/security/authorization/resource-based.md Outdated
Comment thread aspnetcore/razor-pages/security/authorization/resource-based.md Outdated
Comment thread aspnetcore/razor-pages/security/authorization/resource-based.md Outdated
guardrex and others added 3 commits May 5, 2026 11:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Comment thread aspnetcore/security/authorization/resource-based.md
Comment thread aspnetcore/security/authentication/index.md Outdated
Comment thread aspnetcore/razor-pages/security/authorization/resource-based.md
Comment thread aspnetcore/mvc/security/authorization/resource-based.md
Comment thread aspnetcore/security/authentication/index.md
Comment thread aspnetcore/security/authentication/index.md
Comment thread aspnetcore/security/authorization/resource-based.md
@guardrex guardrex requested a review from halter73 May 5, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource-based auth: Refactor for Blazor

2 participants