From e034811e92391ff28b0196caf4975091eabae807 Mon Sep 17 00:00:00 2001 From: Leigh Date: Wed, 15 Dec 2021 18:54:26 +0100 Subject: [PATCH] #1880 Issue with new SettingService Needed to update the SettingService to apply the IsPublic field when updating settings for the ModuleDefinition. --- Oqtane.Client/Services/SettingService.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/Services/SettingService.cs b/Oqtane.Client/Services/SettingService.cs index 74cf39494..2e90d66bc 100644 --- a/Oqtane.Client/Services/SettingService.cs +++ b/Oqtane.Client/Services/SettingService.cs @@ -134,13 +134,20 @@ public async Task UpdateSettingsAsync(Dictionary settings, strin bool ispublic = false; if (value.StartsWith("[Public]")) { - if (entityName == EntityNames.Site) + switch (entityName) { - ispublic = true; + case EntityNames.Site: + case EntityNames.ModuleDefinition: + ispublic = true; + break; + default: + ispublic = false; + break; } - value = value.Substring(8); // remove [Public] + value = value.Substring(8); // remove [Public] } + Setting setting = settingsList.FirstOrDefault(item => item.SettingName.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase)); if (setting == null) {