From d9576e2fd2b08ca30644249ac6f256f9ef6bc000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 23 Dec 2022 18:02:21 +0300 Subject: [PATCH 1/3] Setting management should be only available to tenants --- .../SettingManagementFeatureDefinitionProvider.cs | 3 ++- .../Settings/EmailingPageContributor.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs index 6b763a1472c..6800ce4e2b0 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/SettingManagementFeatureDefinitionProvider.cs @@ -17,7 +17,8 @@ public override void Define(IFeatureDefinitionContext context) "true", L("Feature:SettingManagementEnable"), L("Feature:SettingManagementEnableDescription"), - new ToggleStringValueType()); + new ToggleStringValueType(), + isAvailableToHost: false); settingEnableFeature.CreateChild( SettingManagementFeatures.AllowChangingEmailSettings, diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs index c166ad873e6..bedb993480e 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Settings/EmailingPageContributor.cs @@ -11,7 +11,7 @@ public class EmailingPageContributor : SettingPageContributorBase { public EmailingPageContributor() { - RequiredFeatures(SettingManagementFeatures.Enable); + RequiredTenantSideFeatures(SettingManagementFeatures.Enable); RequiredTenantSideFeatures(SettingManagementFeatures.AllowChangingEmailSettings); RequiredPermissions(SettingManagementPermissions.Emailing); } From 5d183940acdca9c30d9988a4bb99b3959626014a Mon Sep 17 00:00:00 2001 From: malik masis Date: Mon, 26 Dec 2022 13:59:30 +0300 Subject: [PATCH 2/3] Hide the footer buttons when group is empty --- .../Components/FeatureManagementModal.razor | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor index 70bff838c70..aa682906df8 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor @@ -6,15 +6,15 @@ @L["Features"] - + - - @if (Groups == null || !Groups.Any()) - { - @L["NoFeatureFoundMessage"] - } - else - { + @if (Groups == null || !Groups.Any()) + { + @L["NoFeatureFoundMessage"] + } + else + { + @foreach (var group in Groups) @@ -30,7 +30,7 @@ var index = i;

@Groups[index].DisplayName

-
+
@foreach (var feature in Groups[index].Features) {
@@ -42,8 +42,8 @@ @feature.DisplayName + Text="@feature.Value" + TextChanged="@(async (v) => await OnFeatureValueChangedAsync(v, feature))" /> @if (feature.Description != null) {
@feature.Description
@@ -53,12 +53,12 @@ if (feature.ValueType is SelectionStringValueType) { - var items = ((SelectionStringValueType) feature.ValueType).ItemSource.Items; + var items = ((SelectionStringValueType)feature.ValueType).ItemSource.Items; @feature.DisplayName