Starts in:
1 DAY
18 HRS
24 MIN
53 SEC
Starts in:
1 D
18 H
24 M
53 S
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)

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