-
ABP Framework version: v7.4.2
-
UI Type: Angular
-
Database System: EF Core (SQL Server)
-
Tiered (for MVC) or Auth Server Separated (for Angular): yes
-
Exception message and full stack trace:
-
Steps to reproduce the issue:
I need to hide the following options on the user menu.
-
Linked Accounts
-
Authority delegation
I don't want to disable the feature since I will use it in a future edition.
I also want to hide these menu items.
-
Text Templates
-
Language Management
I have tried using feature management to disable these features. But my application is a multitenant application and it does not get disabled for every tenant.
Besides, the goal is to just hide these menus for admins of all tenants not to disable it.
I have already tried these but could not get it to work
https://docs.abp.io/en/abp/latest/UI/Angular/Modifying-the-Menu#how-to-patch-or-remove-a-navigation-element
https://docs.abp.io/en/abp/latest/UI/Angular/Modifying-the-Menu#how-to-patch-or-remove-an-right-part-element
Can you please help with the steps to get these done
7 Answer(s)
-
0
Hello,
To hide menu temporarily like Text Templates and Language Management you may comment them in
app.module.ts
just likeit will result like
thanks
-
0
Thanks for the response.
How about Linked Accounts, authenticator app and Authority delegation
-
0
Hello,
please check similar issue https://support.abp.io/QA/Questions/3741/Linked-accounts-in-header-bar if it helps you.
Thanks
-
1
Yes I have seen this issue ealier. It assumes the UI is MVC. My UI is angular.
Do you mean to say I have to create a new menucontributor in my HttpApi.Host project?
Secondly in my case I do not seek to use permissions to hide or show the menus. I just want to hide it by default. -
0
Hi,
You can hide menu items.
We're sorry to keep you waited. I will leave some code examples.
Authority Delegation and Linked Accounts are under user menu items which handled by
UserMenuService
so you need to do this:const HIDDEN_MENU_ITEMS_PROVIDER = [ { provide: APP_INITIALIZER, useFactory: () => { const userMenu = inject(UserMenuService); return () => { const obj = { visible: () => false }; userMenu.patchItem(eUserMenuItems.AuthorityDelegation, obj); userMenu.patchItem(eUserMenuItems.LinkedAccounts, obj); }; }, multi: true, }, ];
The same should apply for Authenticator App. You need to import
ManageProfileTabsService
from@volo/abp.ng.account
package. You can useeAccountManageProfileTabNames
enum type. -
0
Thanks for the response, managed to modify the userMenu items, but i can't find how to hide/delete filter menu option in the sidemenu. Any topic that i should check?
-
0
Hi,
You can check this documentation.
For example, i can hide the
Administration
tab with this code.const HIDDEN_ROUTES_PROVIDER = [ { provide: APP_INITIALIZER, useFactory: (routesService: RoutesService) => { return () => { const obj = { invisible: true }; routesService.patch(eThemeSharedRouteNames.Administration, obj); }; }, deps: [RoutesService], multi: true, }, ];
-
Use
eLanguageManagementRouteNames.LanguageManagement
from@volo/abp.ng.language-management
-
Use
eTextTemplateManagementRouteNames.TextTemplates
from@volo/abp.ng.text-template-management
-