diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs b/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs index 12565e47d9..34dc3dd4cd 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs +++ b/modules/identity/src/Volo.Abp.Identity.Web/Navigation/AbpIdentityWebMainMenuContributor.cs @@ -16,16 +16,18 @@ namespace Volo.Abp.Identity.Web.Navigation return; } - var administrationMenu = context.Menu.GetAdministration(); - var authorizationService = context.ServiceProvider.GetRequiredService(); - var l = context.ServiceProvider.GetRequiredService>(); var hasRolePermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Roles.Default); var hasUserPermission = await authorizationService.IsGrantedAsync(IdentityPermissions.Users.Default); - + if (hasRolePermission || hasUserPermission) { + var administrationMenu = context.Menu.GetAdministration(); + + + var l = context.ServiceProvider.GetRequiredService>(); + var identityMenuItem = new ApplicationMenuItem(IdentityMenuNames.GroupName, l["Menu:IdentityManagement"], icon: "fa fa-id-card-o"); administrationMenu.AddItem(identityMenuItem);