Open Closed

ABP Add Dynamic permission values for the dynamic menus based on tenant #6583


User avatar
0
Sraman created
  • ABP Framework version: v8.0.0
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server)
  • **Tiered (for MVC) **: yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have populated a dynamic menu based on tenant using ApplicationMenuItem and its working as expected.

And I would like to add those dynamic menus to the permissions page, so that I can assign a role or user level access to each of the menus. Unable to populate menus to the permissions screen based on tenant. PermissionDefinitionProvider is getting initialized only once.

Is there any workaround to include dynamic menu to the permissions page?

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

12 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hi ,

    Can you check once follwoing links 1.https://support.abp.io/QA/Questions/5962/How-to-set-permissions-for-dynamic-menu-items 2.https://github.com/abpframework/abp/issues/4448

    Thank you.

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

    Hi,

    May I know how to implement this https://github.com/abpframework/abp/issues/4448 in more detail.

    Any other Realtime implementation would be great.

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

    @sraman, I think what you mean is to customize the "features" availablef or a tenant and then have only the features that are enabled to be displayed on the menu. Is this correct?

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

    @IanW, I assign a feature value for each tenant and based on that tenant list of reports will available and those are displayed on the menu. I'm able to achieve this. But I need those dynamic menus to be available on permissions for roles and users. So that I can restrict those menus for particular user or roles.

    Hope this is clear?

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

    Is there a way to load menus dynamically with a cache to avoid frequent requests?

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

    Any updates?

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

    The same question: https://support.abp.io/QA/Questions/6604

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

    Hi,

    Need dynamic menus to be available on permissions for roles and users.

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

    Hi,

    Could you explain the exact problem during implementation??

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

    Hi,

    I have implemented dynamic menus using https://support.abp.io/QA/Questions/6604.

    Now I want to give permissions to the dynamically added menus based on roles or users.

    I tried to add the dynamic menus to permissions page with PermissionDefinitionProvider. But it did not work. Because it loads at the application start.

    Not sure how can I achieve this. Need some suggestions to do that.

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

    Hi,

    You can refer to this, where I explain how to refresh permissions https://support.abp.io/QA/Questions/5962/How-to-set-permissions-for-dynamic-menu-items

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer
    • https://support.abp.io/QA/Questions/5962/How-to-set-permissions-for-dynamic-menu-items#answer-3a0e48a9-4356-3b22-2263-0b943112b7a8
    • https://support.abp.io/QA/Questions/5962/How-to-set-permissions-for-dynamic-menu-items#answer-3a0e72d9-ddf3-2c90-2eb2-c18f938256e0

    If I missing something please let me know.

    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 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.