Skip to content

docs: add community article on Resource-Based Authorization in ABP Framework#25039

Merged
EngincanV merged 2 commits into
devfrom
community/resource-based-authorization
Mar 9, 2026
Merged

docs: add community article on Resource-Based Authorization in ABP Framework#25039
EngincanV merged 2 commits into
devfrom
community/resource-based-authorization

Conversation

@maliming

@maliming maliming commented Mar 9, 2026

Copy link
Copy Markdown
Member

Resolve #25035

Copilot AI review requested due to automatic review settings March 9, 2026 08:31
@maliming maliming force-pushed the community/resource-based-authorization branch from 4fdbf44 to 36bfeb1 Compare March 9, 2026 08:33
@abpframework abpframework deleted a comment from github-actions Bot Mar 9, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 69.9%, saving 865.3 KB.

Filename Before After Improvement Visual comparison
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/add-permission-dialog.png 250.4 KB 54.1 KB 78.4% View diff
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/resource-permission-dialog.png 231.8 KB 45.8 KB 80.3% View diff
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/update-permission-dialog.png 246.2 KB 76.2 KB 69.1% View diff
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/book-list.png 221.5 KB 55.5 KB 74.9% View diff
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/delete-permission-confirm.png 168.1 KB 33.0 KB 80.4% View diff
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/cover.jpeg 119.8 KB 108.1 KB 9.8% View diff

@maliming maliming added this to the 10.3-preview milestone Mar 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a new community article about Resource-Based Authorization and extends ABP’s API description/proxy scripting infrastructure to optionally surface XML-doc/attribute-based descriptions (with accompanying test coverage).

Changes:

  • Add a new community article: “Resource-Based Authorization in ABP Framework”.
  • Add XML documentation extraction support (summary/remarks/returns/param summaries + [Description]/[Display]) and plumb it into the API definition model when includeDescriptions=true.
  • Refactor API-model creation and proxy-script generation paths to async and add tests covering the new description behavior.

Reviewed changes

Copilot reviewed 1 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/InterfaceOnlyDocumentedAppService.cs Adds a test app service implementation used for interface-only XML doc fallback scenarios.
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IInterfaceOnlyDocumentedAppService.cs Adds XML docs on the interface to test doc fallback behavior.
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IDocumentedAppService.cs Adds a documented test app service contract used for API description extraction tests.
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/Dto/DocumentedDto.cs Adds a DTO with XML docs and [Description]/[Display] attributes for type/property description tests.
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs Adds a documented implementation with method/parameter attributes to validate extraction behavior.
framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj Enables XML doc file generation for the test app assembly.
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/XmlDocumentationProviderTests.cs Adds unit tests for XML documentation parsing/cleanup behaviors.
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Description_Tests.cs Adds integration tests verifying includeDescriptions behavior and interface fallback.
framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/ProxyScriptManagerCache.cs Reworks proxy script caching to support async factories and deduplicate concurrent generation.
framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/ProxyScriptManager.cs Switches proxy script generation flow to async and uses async API model creation.
framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/IProxyScriptManagerCache.cs Changes the cache abstraction to async-only.
framework/src/Volo.Abp.Http/Volo/Abp/Http/ProxyScripting/IProxyScriptManager.cs Changes the proxy script manager abstraction to async-only.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/TypeApiDescriptionModel.cs Adds Summary/Remarks/Description/DisplayName fields for type descriptions.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ReturnValueApiDescriptionModel.cs Adds Summary field for return value documentation.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/PropertyApiDescriptionModel.cs Adds Summary/Description/DisplayName fields for property descriptions.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs Adds Summary/Description/DisplayName fields for HTTP parameter descriptions.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/MethodParameterApiDescriptionModel.cs Adds Summary/Description/DisplayName fields for method-parameter descriptions.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/IApiDescriptionModelProvider.cs Changes the API model provider abstraction to async-only.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs Adds controller description fields and ensures CreateSubModel preserves them.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModelRequestDto.cs Adds IncludeDescriptions request flag to control description population.
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs Adds action description fields (summary/remarks/description/display name).
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ProxyScripting/AbpServiceProxyScriptController.cs Updates controller endpoint to call the async proxy script manager API.
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs Implements description population (XML docs + attributes) and interface fallback for API definitions.
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/XmlDocumentationProvider.cs Introduces an XML doc provider that loads/parses XML documentation files and cleans text.
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/IXmlDocumentationProvider.cs Adds the abstraction for XML documentation retrieval.
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController.cs Updates API definition endpoint to use async model creation.
docs/en/Community-Articles/2026-03-09-Resource-Based-Authorization-in-ABP-Framework/POST.md Adds the Resource-Based Authorization community article content.

Comment on lines +1 to +5
# Resource-Based Authorization in ABP Framework

ABP has a built-in permission system that supports role-based access control (RBAC). You define permissions, assign them to roles, and assign roles to users — once a user logs in, they automatically have the corresponding access. This covers the vast majority of real-world scenarios and is simple, straightforward, and easy to maintain.

However, there is one class of requirements it cannot handle: **different access rights for different instances of the same resource type**.

Copilot AI Mar 9, 2026

Copy link

Choose a reason for hiding this comment

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

PR metadata/title indicates this is a docs-only change for a community article, but this PR also introduces significant framework/runtime changes (new XML doc provider, new API description fields, and several public API signature changes). Consider splitting the framework changes into a separate PR or updating the PR title/description to reflect the actual scope, since this affects review/triage and release notes expectations.

Copilot uses AI. Check for mistakes.
@maliming maliming requested a review from EngincanV March 9, 2026 08:53
@EngincanV EngincanV merged commit 5814185 into dev Mar 9, 2026
1 check passed
@EngincanV EngincanV deleted the community/resource-based-authorization branch March 9, 2026 08:57
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.

Article: Resource-Based Authorization

3 participants