Starts in:
2 DAYS
9 HRS
30 MIN
2 SEC
Starts in:
2 D
9 H
30 M
2 S
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?


12 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team 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.

  • 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.

  • 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?

  • 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?

  • User Avatar
    0
    Sraman created

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

  • User Avatar
    0
    Sraman created

    Any updates?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

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

  • User Avatar
    0
    Sraman created

    Hi,

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

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could you explain the exact problem during implementation??

  • 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.

  • User Avatar
    0
    liangshiwei created
    Support Team 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

  • User Avatar
    0
    liangshiwei created
    Support Team 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.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06