0
WilliamT created
- ABP Framework version: v7.1.2
- UI Type: MVC
- Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
Hi,
How Can I remove these 4 items from "Main" Toolbar:
- Linked Accounts
- Authority delegation
- security logs
- Personal data
Is there a way to control those items via permission?
Regards,
3 Answer(s)
-
0
Hello WilliamT,
Please add this code to CustomMenuContributor under
*.Web/Menus
public async Task ConfigureMenuAsync(MenuConfigurationContext context) { if (context.Menu.Name == StandardMenus.User) { context.Menu.Items.RemoveAll(x => x.Name == "Account.SecurityLogs"); context.Menu.Items.RemoveAll(x => x.Name == "Account.LinkedAccounts"); context.Menu.Items.RemoveAll(x => x.Name == "Account.AuthorityDelegation"); } }
It will gives output like
-
0
Hi Anjali,
Thank you. However, is there a cleaner approach? Such as creating a new StandardMenu config where I can define what items it will have?
Regards,
-
0
Hello WilliamT,
please try to add the below code to add new menu item
context.Menu.AddItem( new ApplicationMenuItem(demo5979Menus.Home,"My New Menu Item", "/My/NewMenuItem", icon: "fa fa-home"));