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
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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)

    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.