From d874cbde4e74c21dd2f1377444ea2c5c276f56cf Mon Sep 17 00:00:00 2001 From: oykuermann <142304401+oykuermann@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:04:42 +0300 Subject: [PATCH] Show the Settings menu item only when the settings page has a group SettingManagementMainMenuContributor added the item when a setting page contributor was available. TimeZonePageContributor is available on its permission alone and adds its group only when the clock supports multiple time zones (not by default). So the admin of a new tenant in an open-source MVC solution, who has the time zone permission but not the AllowChangingEmailSettings feature, got a Settings item whose page said "There are no settings to display." The item is now added only when SettingPageContributorManager.ConfigureAsync() returns a group. Co-Authored-By: Claude Opus 5.5 --- .../Navigation/SettingManagementMainMenuContributor.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index a5775a8a42..97250a19fe 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -24,8 +24,10 @@ public class SettingManagementMainMenuContributor : IMenuContributor return; } + /* A contributor can be available and still add no group: the time zone one adds its group only when the + * clock supports multiple time zones. Show the item only when the page has a group to show. */ var settingPageContributorManager = context.ServiceProvider.GetRequiredService(); - if (!(await settingPageContributorManager.GetAvailableContributors()).Any()) + if (!(await settingPageContributorManager.ConfigureAsync()).Groups.Any()) { return; }