I'm having trouble showing/hiding default menu items in Abp's Administration. I want to know how I can customize the visibility of menu items and tabs within those items. For example, I want to hide the Language management and Text templates items, the Emailing tab, and Menu:Account within the Settings item. Also, is it possible to customize this visibility separately for the host account and the tenant account?
3 Answer(s)
-
0
Hi,
Those administration menu items and setting tabs are not hardcoded — each one is registered with a permission, and they only render when the current user (or role) has it. Hiding them is just a matter of un-granting the corresponding permission, no code change needed.
Here is the mapping for the items you mentioned:
| Item | Permission | |---|---| | Language management menu |
LanguageManagement.Languages| | Text templates menu |TextTemplateManagement.TextTemplates| | Settings → Emailing tab |SettingManagement.Emailing| | Settings → Menu:Account tab |AbpAccount.SettingManagement|All four are available on both host and tenant side, so host and tenants can be customized independently:
- Host: log in as host admin, go to
Identity management → Roles, open theadminrole'sPermissionstab, and uncheck whatever you want to hide. - Tenant: log in as that tenant (or use "Login as tenant" from the host's Saas management) and do the same on its own
adminrole. Each tenant can be configured independently.
Could you try this and let us know if you run into any issue? For example a menu still showing after unchecking, or a permission you can't find on the Permissions tab — that would help us see what's actually blocking you.
Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - Host: log in as host admin, go to
-
0
In the AbpPermissionGrants table in the database, I set the IsEnabled value to false for the record named LanguageManagement.Languages. This prevents Language Management from appearing in the settings menu when a new tenant is added. However, when I do the same with the TextTemplateManagement.TextTemplates record, the Text Template item is not hidden in the settings menu. How can I set TextTemplate to be hidden by default for new tenants?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
Quick correction on the table you tried:
AbpPermissionGrantsdoesn't have anIsEnabledcolumn. Each row is one grant, so revoking a permission means deleting the row. TheIsEnabledcolumn you saw belongs toAbpPermissions(the permission definitions store), which is only read at runtime whenIsDynamicPermissionStoreEnabled = true(microservice template). Editing it on a standard app does nothing.Menu items and setting tabs are controlled by features + permissions — either one being denied hides the item. You don't need to touch the database for any of this.
Three of the four items are feature-driven. You can toggle them from the SaaS admin UI:
| Item | Feature | |---|---| | Language management menu |
LanguageManagement.Enable| | Text templates menu |TextManagement.Enable(group name isTextManagement, notTextTemplateManagement) | | Settings → Emailing tab |SettingManagement.AllowChangingEmailSettings|Go to
SaaS → Editions, clickFeatureson the edition your tenants use, and toggle these three off. Every tenant assigned to that edition inherits the disabled features automatically — no per-tenant action needed. If you want to override per tenant,SaaS → Tenantshas the sameFeaturesbutton on each row.⚠️ Do not disable
SettingManagement.Enable— that hides the entireSettingsmenu, not just the Emailing tab.The
Menu:Accounttab is the only one without a feature, so it's permission-only. The simplest way to hide it from all tenants (current and future) is to override the permission so it only applies to the host. In your*.Application.Contractsproject add:public class CustomAccountPermissionDefinitionProvider : PermissionDefinitionProvider { public override void Define(IPermissionDefinitionContext context) { var p = context.GetPermissionOrNull("AbpAccount.SettingManagement"); if (p != null) { p.MultiTenancySide = MultiTenancySides.Host; } } }The data seeder filters permissions by
MultiTenancySide, so once this is in place new tenants never get this grant in the first place. For tenants that already have the grant, delete it once (either re-run your seeder or useLogin as tenantfromSaaS → Tenantsand uncheckAccount → Setting Managementon the tenant'sadminrole).Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)