Open Closed

[Question] How to bypass permission check in some method in AppService for a Commercial module #1054


User avatar
0
yinchang created
  • ABP Framework version: 4.2.2
  • UI type: don't care
  • DB provider: don't care
  • Tiered (MVC) or Identity Server Separated (Angular): don't care

HI: I have a question: When I use FileManagement module, for execute DownloadAsync method in FileDescriptorAppService it need FileManagement.FileDescriptor permission, but I want to let it can be executed without any permission,everyone can use it to download file, I had already read doc about overriding-a-permission-by-a-custom-policy but i don't know how to ignore exist policy for a appservice.

Can you tell me how to do? thank you.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can create a subclass to replace FileDescriptorAppService. And overide DownloadAsync method to use AllowAnonymous attribute.

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    yinchang created

    hi

    You can create a subclass to replace FileDescriptorAppService. And overide DownloadAsync method to use AllowAnonymous attribute.

    https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services

    Hi: Thank you,It's work

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.