0
jhsanc created
- ABP Framework version: v5.1.3
- UI type: Blazor WebAssembly
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes / no
I need hide or show Main Menú Items from Abp Modules.
For example I need hide FileManagement from main menu based on roles or permissions, don't matter if I added permissions inside application I need always hide menu based in other permission. This not found:
var fileMenu = context.Menu.FindMenuItem(FileManagementMenuNames.GroupName);
fileMenu.RequirePermissions("MyProject.Crm.Shared");
Thank you.
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
12 Answer(s)
-
0
hi
You can add these code to the
SportsMenuContributorI will fix the menu problem in next version.var lf = context.GetLocalizer<FileManagementResource>(); context.Menu.GetAdministration().TryRemoveMenuItem(FileManagementMenuNames.GroupName); context.Menu .GetAdministration() .AddItem( new ApplicationMenuItem(FileManagementMenuNames.GroupName, lf["Menu:FileManagement"], "~/file-management", icon: "fa fa-folder-open") .RequireFeatures(FileManagementFeatures.Enable) .RequirePermissions(FileManagementPermissions.DirectoryDescriptor.Default) .RequirePermissions("Innovain.Sports.Shared") );Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)



