Open Closed

Custom Hide default menu Item #10709


User avatar
0
vietdoan08032001 created

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?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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 the admin role's Permissions tab, 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 admin role. 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)
  • User Avatar
    0
    vietdoan08032001 created

    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)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi,

    Quick correction on the table you tried: AbpPermissionGrants doesn't have an IsEnabled column. Each row is one grant, so revoking a permission means deleting the row. The IsEnabled column you saw belongs to AbpPermissions (the permission definitions store), which is only read at runtime when IsDynamicPermissionStoreEnabled = 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 is TextManagement, not TextTemplateManagement) | | Settings → Emailing tab | SettingManagement.AllowChangingEmailSettings |

    Go to SaaS → Editions, click Features on 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 → Tenants has the same Features button on each row.

    ⚠️ Do not disable SettingManagement.Enable — that hides the entire Settings menu, not just the Emailing tab.

    The Menu:Account tab 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.Contracts project 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 use Login as tenant from SaaS → Tenants and uncheck Account → Setting Management on the tenant's admin role).

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.