Open Closed

Dynamic Menu based on user role #4272


User avatar
0
yim.tim created

Did Abp support dynamic menu based on user role? Scenarios,

  1. Senior manager can see "Commission Configuration" and edit the commission in the related Angular app/component.
  2. manager can see "Commission Configuration" menu, view the commission only a Angular app/component can be accessed.
  3. operator cannot see "Commission Configuration" menu and the related Angular app deny to accessed.
  • ABP Framework version: v6.0.2 micro-service template
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

1 Answer(s)
  • User Avatar
    0
    muhammedaltug created

    Hello,

    You can assign permission to requiredPolicy property of the related component's route menu configuration. You can read the document about RoutesService for more information.

    routes.add([
        {
            // other route properties
            requiredPolicy: 'ReadPermission',
        },
    ]);
    

    You can use Permission Directive to manage the visibility of a DOM Element (Create Button)

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 v9.3.0-preview. Updated on May 15, 2025, 10:28