- ABP Framework version: v4.2.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace: NA
- Steps to reproduce the issue:"NA
We have to enable below permission for role but don't want menu (administration --> identity management --> users) to be displayed in web UI. How we can achieve it. Identity management --> user management --> create/Edit permission
10 Answer(s)
- 
    0Hi, Sorry, but can you explant it in detail? thanks 
- 
    0
- 
    0Hi, You can the following code to your MenuContributorvar identity = context.Menu.GetAdministration().GetMenuItem(IdentityMenuNames.GroupName); identity.GetMenuItem(IdentityMenuNames.Users).RequirePermissions(IdentityPermissions.Users.Delete, IdentityPermissions.Users.Create);
- 
    0
- 
    0If this is the righ place to modify code i am getting error in identity.GetMenuItem("Users").RequirePermissions(IdentityPermissions.Users.Delete, IdentityPermissions.Users.Create); 
- 
    0Hi, Sorry, I just realized you are using angular UI. You can check the document to patch a menu: https://docs.abp.io/en/abp/4.2/UI/Angular/Modifying-the-Menu#how-to-patch-or-remove-a-navigation-element const newIdentityUserRouteConfig: Partial<ABP.Route> = { parentName: eIdentityRouteNames.IdentityManagement, requiredPolicy: 'permission key here', }; this.routes.patch(eIdentityRouteNames.Users, newIdentityUserRouteConfig);
- 
    0How we can add multiple policies. is it comma seperated and will it consider "and" or "or" condition for permissions? 
- 
    0Hi, How we can add multiple policies. is it comma seperated and will it consider "and" or "or" condition for permissions? Unfortunately not. 
- 
    0Oh Ok. So it will consider only 1 policy? 
- 
    0




 
                                