Role-based authorization overhaul#36885
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refreshes and restructures role-based authorization guidance across ASP.NET Core docs, emphasizing Blazor examples in the main article and adding dedicated Razor Pages and MVC role-authorization articles. It also removes older sample projects that were primarily used for snippet extraction.
Changes:
- Updated the main role-based authorization article to focus on Blazor and added versioned guidance for
AddAuthorizationBuildervsAddAuthorization. - Added new dedicated role-based authorization articles for Razor Pages and MVC.
- Removed multiple legacy
WebAllsample projects/files (6.0/7.x/2.2/3.0) that were used mainly for snippet highlighting.
Reviewed changes
Copilot reviewed 83 out of 83 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| aspnetcore/security/authorization/simple.md | Adds moniker range and clarifies the article’s Blazor focus and version framing. |
| aspnetcore/security/authorization/roles.md | Reworks role-based authorization guidance around Blazor components and adds versioned policy configuration and Windows auth group guidance. |
| aspnetcore/razor-pages/security/authorization/roles.md | New Razor Pages-specific role authorization article with handler-method guidance. |
| aspnetcore/mvc/security/authorization/roles.md | New MVC-specific role authorization article with controller/action examples. |
| aspnetcore/blazor/security/index.md | Improves xref display formatting for AuthorizeView and [Authorize] role/policy parameters. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/appsettings.json | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/appsettings.Development.json | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/WebAll.csproj | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/_ViewStart.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/_ViewImports.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Vacation/VacationPolicy.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Vacation/VacationBalance.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/x_Layout.cshtml.css | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/x_Layout.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/_ValidationScriptsPartial.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/Error.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Salary/Index.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Home2/Privacy.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Home2/Index.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/README.md | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Program.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/_ViewStart.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/_ViewImports.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/X/Update.cshtml.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/X/Update.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_ValidationScriptsPartial.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_Layout.cshtml.css | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_Layout.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Privacy.cshtml.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Privacy.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Index.cshtml.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Index.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Error.cshtml.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Error.cshtml | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Models/ErrorViewModel.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/VacationController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/SalaryController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/Home2Controller.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlPanelController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlAllPanelController2.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlAllPanelController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/Control3PanelController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/AdministrationController.cs | Removes legacy 7.x WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/appsettings.json | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/appsettings.Development.json | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/WebAll.csproj | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/_ViewStart.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/_ViewImports.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Vacation/VacationPolicy.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Vacation/VacationBalance.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/x_Layout.cshtml.css | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/x_Layout.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/_ValidationScriptsPartial.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/Error.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Salary/Index.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Home2/Privacy.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Home2/Index.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/README.md | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Program.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/_ViewStart.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/_ViewImports.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/X/Update.cshtml.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/X/Update.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_ValidationScriptsPartial.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_Layout.cshtml.css | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_Layout.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Privacy.cshtml.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Privacy.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Index.cshtml.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Index.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Error.cshtml.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Error.cshtml | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Models/ErrorViewModel.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/VacationController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/SalaryController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/Home2Controller.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlPanelController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlAllPanelController2.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlAllPanelController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/Control3PanelController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/AdministrationController.cs | Removes legacy 6.0 WebAll sample artifact. |
| aspnetcore/security/authorization/roles/samples/3_0/Startup.cs | Removes legacy 3.0 sample used for snippet extraction. |
| aspnetcore/security/authorization/roles/samples/2_2/Startup.cs | Removes legacy 2.2 sample used for snippet extraction. |
|
@guardrex, thanks. Keep in mind we also use the full samples to test more extensive code examples used inthe doc, know what was tested and to quickly check it again at the next major update. It is not just for the sake of commnity download. Tiny stuff doesn't warrent a fuill sample of course. |
Its a balance, and up to you. I just wanted to note that samples are not just for customer downloads. We don't need a full sample for everything, but we also need a way to verify entensive code used in a doc still works and even compiles. |
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
|
cc: @danroth27 and @cmastr for assistance. TL;DR ... The sample for the roles-based auth article is old and has problems for use with the updated main doc set coverage, which is adopting 100% Razor component examples now. The samp even has problems for use with the new split MVC and RP versions back in their respective security nodes. We're trying to figure out what to do about the sample(s) for the three roles-based security articles. @wadepickett ... Took a closer look. There are several problems with the current sample app ...
I'm leaning toward at least creating a BWA 10.0 sample to go with the main doc set article. Does everyone concur? If you would also like MVC and RP samps, mirroring the API shown in those articles and supplying code snippets to them with line highlights, I certainly can whip those up. |
Thanks for the deep dive on the sample app Luke, that's really helpful context. To clarify for anyone following along: the sample app issues described here are about the existing companion sample that lives alongside the current docs, not something introduced or reviewed in this PR but related to the overall goal. I agree we should prioritize a single Blazor Web App sample with Razor component examples and keep MVC/Razor Pages as inline snippets only, rather than investing in three separate sample apps. I'm not real up on this old sample yet, Rick had originally provided it, I need to catch up. The current 7.0 sample does not seem worth salvaging given the broken Identity setup and the non-runnable compiler-directive scenarios. A single Blazor Web App sample makes the most sense for maintenance and dev experience. |
|
I agree, @wadepickett! 👍 I still have two hours left, so I'm going to work on a BWA sample companion for the main doc set article to demo the features described. If don't have that posted today, it will be posted for review on Monday. |
There was a problem hiding this comment.
This looks good! My biggest feedback is to split the paragraphs that introduce the case sensitivity of roles and case insensitivity of policies into separate paragraphs, and to mention the case sensitivity of roles in more places (the MVC and Razor Pages companion articles).
Other than that, I do think we need to discuss the case-sensitivity of claim types in https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authorization/claims.md, because that's the actually hairy bit. I suggested possible language for that in https://github.com/dotnet/AspNetCore.Docs/pull/36885/changes#r2968415341 while also providing some context. That can definitely be a different PR though.
Co-authored-by: Stephen Halter <halter73@gmail.com>
|
@halter73 ... Updates made on the last commit 👇. Thanks for your help and review of the new code bits that I'm adding for WinAuth and RP page handler guidance. It looks like most of the articles in the main doc set's security node will require at least some ✨ Blazorfication!™ ✨ work, which will typically include moving MVC and RP coverage back to their new security node folders (just like what's happening on this PR). If I run into challenging updates or need to introduce code examples that I'm not 100% confident in, I'll ping you on the PR and via email. Thanks for your review and recommendations, @wadepickett. I have one task left here: Copilot has identified a few more NITs to address. I'll take care of them by tomorrow morning. |
There was a problem hiding this comment.
Pull request overview
This PR restructures and modernizes the role-based authorization documentation set by shifting the main article to Blazor-focused guidance, adding dedicated Razor Pages and MVC articles, and removing repo-local sample projects that were only used for snippet extraction.
Changes:
- Refactors
security/authorization/roles.mdto focus on Blazor role/policy authorization patterns and adds Windows Authentication security group guidance. - Adds new role-based authorization articles for Razor Pages and MVC with versioned guidance.
- Removes legacy
roles/samples/*projects and adds supporting doc updates (claim case-sensitivity note, minor formatting updates, metadata updates).
Reviewed changes
Copilot reviewed 87 out of 87 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| aspnetcore/security/authorization/simple.md | Adds moniker range metadata to the simple authorization article. |
| aspnetcore/security/authorization/roles.md | Rewrites the main roles article to focus on Blazor scenarios, adds new sections, and updates versioned guidance. |
| aspnetcore/security/authorization/claims.md | Adds a new section describing claim case-sensitivity considerations. |
| aspnetcore/razor-pages/security/authorization/roles.md | New Razor Pages-specific role authorization article. |
| aspnetcore/mvc/security/authorization/roles.md | New MVC-specific role authorization article. |
| aspnetcore/blazor/security/index.md | Updates role/policy parameter xref display and case-sensitivity guidance wording. |
| aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles.md | Updates role/policy case-sensitivity guidance and links to the new claims section. |
| aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles-net-5-to-7.md | Updates role/policy case-sensitivity guidance and links to the new claims section. |
| aspnetcore/fundamentals/static-files.md | Minor formatting tweak for inline role name formatting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/appsettings.json | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/appsettings.Development.json | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/WebAll.csproj | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/_ViewStart.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/_ViewImports.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Vacation/VacationPolicy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Vacation/VacationBalance.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/x_Layout.cshtml.css | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/x_Layout.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/_ValidationScriptsPartial.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Shared/Error.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Salary/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Home2/Privacy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Views/Home2/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/README.md | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Program.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/_ViewStart.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/_ViewImports.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/X/Update.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/X/Update.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_ValidationScriptsPartial.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_Layout.cshtml.css | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Shared/_Layout.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Privacy.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Privacy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Index.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Error.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Pages/Error.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Models/ErrorViewModel.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/VacationController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/SalaryController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/Home2Controller.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlPanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlAllPanelController2.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/ControlAllPanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/Control3PanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/7.x/WebAll/Controllers/AdministrationController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/appsettings.json | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/appsettings.Development.json | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/WebAll.csproj | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/_ViewStart.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/_ViewImports.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Vacation/VacationPolicy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Vacation/VacationBalance.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/x_Layout.cshtml.css | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/x_Layout.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/_ValidationScriptsPartial.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Shared/Error.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Salary/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Home2/Privacy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Views/Home2/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/README.md | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Program.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/_ViewStart.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/_ViewImports.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/X/Update.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/X/Update.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_ValidationScriptsPartial.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_Layout.cshtml.css | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Shared/_Layout.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Privacy.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Privacy.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Index.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Index.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Error.cshtml.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Pages/Error.cshtml | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Models/ErrorViewModel.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/VacationController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/SalaryController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/Home2Controller.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlPanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlAllPanelController2.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/ControlAllPanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/Control3PanelController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/6_0/WebAll/Controllers/AdministrationController.cs | Deletes repo-local sample artifacts previously used for snippet highlighting. |
| aspnetcore/security/authorization/roles/samples/3_0/Startup.cs | Removes older sample source used for snippet inclusion. |
| aspnetcore/security/authorization/roles/samples/2_2/Startup.cs | Removes older sample source used for snippet inclusion. |
Lick'd IT! 🐮👅Looks great! Merging now! 🎉🍻 @wadepickett @tdykstra @cmastr ... Final note on the BWA sample for this and other new main doc set samples ... I think you're all aware that I keep the Blazor samples for Blazor node articles in the dedicated Blazor samples repo up-to-date. All samples are constituted from the new project templates every release, so devs are getting the latest Blazor goodness for any current release. I don't know if we keep adding Blazor samples to that repo how long I can keep it up, but we'll see. I hope I can keep going with up-to-date samples every release 🤞🍀. The main doc set samples (over 100 of them) haven't had that level of attention or organization, and I think that there are over 600 samples sprinkled around the main doc set repo, also probably somewhat disorganized and certainly in various states of framework targeting. The Blazor samples added for this PR and for the IARD article aren't laid out in a folder structure for framework versioning simply because the folder structure is a bit of a mess at the moment generally and not present for the Side Note: Years ago, the plan was that samples would be built automatically every release, but that never came to pass. Even on the Blazor samples repo, I only build the primary pair of samples that provide code snippets to Blazor articles. I think that's worth a discussion as well. It doesn't seem critical to our efforts because we're compiling and checking them as we go, but it's worth a passing mention that automatically building any of the sample apps on modification (via PRs) can be instituted. For the Blazor samples, the approach looks like this ... https://github.com/dotnet/blazor-samples/blob/main/.github/workflows/validate-samples.yml. Just tossing that out there in case it's worth discussion. Alright ...... thanks for reading my 📖 on this! 🙈😆 I'm merging this now, and I'll pick another ✨ Blazorfy IT!™ ✨ issue to resolve. |
Fixes #36868
Fixes #34468
Fixes #34879
Fixes #32489
Wade, I sent Stephen an email asking for review. There's enough authz 🧀 moving around here with new content coming in that I think his 👀 on this one makes sense. It might take him a minute to reach this. I suggest we go ahead with our review whenever you're ready. No rush on this one. I'll move on to my next Blazorfy IT!™ effort 😄.
Notes
[Authorize]attribute. I'm guiding readers to either use separate pages or callIAuthorizationService.AuthoizeAsync/User.IsInRolein handler methods of a page model class.Additional issues resolved:
AuthorizationBuilder. It became available at 7.0. Prior to 7.0,AddAuthorization(options => { ... }was in use withbuilder.Servicesin theProgramfile. Prior to 6.0, it would beAddAuthorization(options => { ... }withservicesinStartup.ConfigureServices. This is all versioned on the PR now within the sections.Internal previews