- 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)
-
0
Hi,
Sorry, but can you explant it in detail? thanks
-
0
-
0
Hi,
You can the following code to your
MenuContributor
var identity = context.Menu.GetAdministration().GetMenuItem(IdentityMenuNames.GroupName); identity.GetMenuItem(IdentityMenuNames.Users).RequirePermissions(IdentityPermissions.Users.Delete, IdentityPermissions.Users.Create);
-
0
-
0
If this is the righ place to modify code i am getting error in
identity.GetMenuItem("Users").RequirePermissions(IdentityPermissions.Users.Delete, IdentityPermissions.Users.Create);
-
0
Hi,
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);
-
0
How we can add multiple policies. is it comma seperated and will it consider "and" or "or" condition for permissions?
-
0
Hi,
How we can add multiple policies. is it comma seperated and will it consider "and" or "or" condition for permissions?
Unfortunately not.
-
0
Oh Ok. So it will consider only 1 policy?
-
0