diff --git a/src/OrchardCore.Modules/OrchardCore.OpenId/Views/OpenIdValidationSettings.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.OpenId/Views/OpenIdValidationSettings.Edit.cshtml
index a27025d3100..d1bf40d588d 100644
--- a/src/OrchardCore.Modules/OrchardCore.OpenId/Views/OpenIdValidationSettings.Edit.cshtml
+++ b/src/OrchardCore.Modules/OrchardCore.OpenId/Views/OpenIdValidationSettings.Edit.cshtml
@@ -1,8 +1,6 @@
@using OrchardCore.OpenId.ViewModels
@model OpenIdValidationSettingsViewModel
-
@T["The current tenant will be reloaded when the settings are saved."]
-
@T["To be able to validate tokens issued by a separate tenant, " +
"you must register a custom scope in the server options " +
diff --git a/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs
index be178f4910b..426f0cf1dc7 100644
--- a/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs
+++ b/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs
@@ -3,6 +3,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using OrchardCore.Deployment;
+using OrchardCore.Json;
using OrchardCore.Placements.Services;
namespace OrchardCore.Placements.Deployment
@@ -14,10 +15,10 @@ public class PlacementsDeploymentSource : IDeploymentSource
public PlacementsDeploymentSource(
PlacementsManager placementsManager,
- IOptions jsonSerializerOptions)
+ IOptions jsonSerializerOptions)
{
_placementsManager = placementsManager;
- _jsonSerializerOptions = jsonSerializerOptions.Value;
+ _jsonSerializerOptions = jsonSerializerOptions.Value.SerializerOptions;
}
public async Task ProcessDeploymentStepAsync(DeploymentStep step, DeploymentPlanResult result)
diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs
index 7ecdc9e65a8..ab56875db17 100644
--- a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs
+++ b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs
@@ -3,6 +3,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using OrchardCore.Deployment;
+using OrchardCore.Json;
namespace OrchardCore.Queries.Deployment
{
@@ -13,10 +14,10 @@ public class AllQueriesDeploymentSource : IDeploymentSource
public AllQueriesDeploymentSource(
IQueryManager queryManager,
- IOptions jsonSerializerOptions)
+ IOptions jsonSerializerOptions)
{
_queryManager = queryManager;
- _jsonSerializerOptions = jsonSerializerOptions.Value;
+ _jsonSerializerOptions = jsonSerializerOptions.Value.SerializerOptions;
}
public async Task ProcessDeploymentStepAsync(DeploymentStep step, DeploymentPlanResult result)
diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Recipes/QueryStep.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Recipes/QueryStep.cs
index e46b2baaf17..026f9a88bbd 100644
--- a/src/OrchardCore.Modules/OrchardCore.Queries/Recipes/QueryStep.cs
+++ b/src/OrchardCore.Modules/OrchardCore.Queries/Recipes/QueryStep.cs
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
+using OrchardCore.Json;
using OrchardCore.Recipes.Models;
using OrchardCore.Recipes.Services;
@@ -24,12 +25,12 @@ public class QueryStep : IRecipeStepHandler
public QueryStep(
IQueryManager queryManager,
IEnumerable querySources,
- IOptions jsonSerializerOptions,
+ IOptions jsonSerializerOptions,
ILogger logger)
{
_queryManager = queryManager;
_querySources = querySources;
- _jsonSerializerOptions = jsonSerializerOptions.Value;
+ _jsonSerializerOptions = jsonSerializerOptions.Value.SerializerOptions;
_logger = logger;
}
diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/SqlQuerySource.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/SqlQuerySource.cs
index dac4c8d7120..741b2cdc392 100644
--- a/src/OrchardCore.Modules/OrchardCore.Queries/Sql/SqlQuerySource.cs
+++ b/src/OrchardCore.Modules/OrchardCore.Queries/Sql/SqlQuerySource.cs
@@ -10,6 +10,7 @@
using Microsoft.Extensions.Options;
using OrchardCore.ContentManagement;
using OrchardCore.Data;
+using OrchardCore.Json;
using OrchardCore.Liquid;
using YesSql;
@@ -27,13 +28,13 @@ public SqlQuerySource(
ILiquidTemplateManager liquidTemplateManager,
IDbConnectionAccessor dbConnectionAccessor,
ISession session,
- IOptions jsonSerializerOptions,
+ IOptions jsonSerializerOptions,
IOptions templateOptions)
{
_liquidTemplateManager = liquidTemplateManager;
_dbConnectionAccessor = dbConnectionAccessor;
_session = session;
- _jsonSerializerOptions = jsonSerializerOptions.Value;
+ _jsonSerializerOptions = jsonSerializerOptions.Value.SerializerOptions;
_templateOptions = templateOptions.Value;
}
diff --git a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaSettingsDisplayDriver.cs b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaSettingsDisplayDriver.cs
index 25fb57581d4..c4d1dbb0338 100644
--- a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaSettingsDisplayDriver.cs
+++ b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Drivers/ReCaptchaSettingsDisplayDriver.cs
@@ -6,6 +6,7 @@
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Environment.Shell;
+using OrchardCore.Modules;
using OrchardCore.ReCaptcha.Configuration;
using OrchardCore.ReCaptcha.ViewModels;
using OrchardCore.Settings;
@@ -34,6 +35,11 @@ public ReCaptchaSettingsDisplayDriver(
public override async Task EditAsync(ReCaptchaSettings settings, BuildEditorContext context)
{
+ if (!context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
var user = _httpContextAccessor.HttpContext?.User;
if (!await _authorizationService.AuthorizeAsync(user, Permissions.ManageReCaptchaSettings))
@@ -41,6 +47,8 @@ public override async Task EditAsync(ReCaptchaSettings settings,
return null;
}
+ context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
+
return Initialize("ReCaptchaSettings_Edit", model =>
{
model.SiteKey = settings.SiteKey;
@@ -59,7 +67,7 @@ public override async Task UpdateAsync(ReCaptchaSettings section
return null;
}
- if (context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
+ if (context.GroupId.EqualsOrdinalIgnoreCase(GroupId))
{
var model = new ReCaptchaSettingsViewModel();
diff --git a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml
index 4af732e87d4..de9860a3971 100644
--- a/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml
+++ b/src/OrchardCore.Modules/OrchardCore.ReCaptcha/Views/ReCaptchaSettings.Edit.cshtml
@@ -1,7 +1,5 @@
@model ReCaptchaSettingsViewModel
-@T["The current tenant will be reloaded when the settings are saved."]
-
diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Drivers/ReverseProxySettingsDisplayDriver.cs b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Drivers/ReverseProxySettingsDisplayDriver.cs
index ee440e581c3..a63d7c01859 100644
--- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Drivers/ReverseProxySettingsDisplayDriver.cs
+++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Drivers/ReverseProxySettingsDisplayDriver.cs
@@ -1,3 +1,4 @@
+using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
@@ -6,6 +7,7 @@
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Environment.Shell;
+using OrchardCore.Modules;
using OrchardCore.ReverseProxy.Settings;
using OrchardCore.ReverseProxy.ViewModels;
using OrchardCore.Settings;
@@ -35,6 +37,11 @@ public ReverseProxySettingsDisplayDriver(
public override async Task
EditAsync(ReverseProxySettings settings, BuildEditorContext context)
{
+ if (!context.GroupId.Equals(GroupId, StringComparison.OrdinalIgnoreCase))
+ {
+ return null;
+ }
+
var user = _httpContextAccessor.HttpContext?.User;
if (!await _authorizationService.AuthorizeAsync(user, Permissions.ManageReverseProxySettings))
@@ -42,12 +49,15 @@ public override async Task EditAsync(ReverseProxySettings settin
return null;
}
+ context.Shape.Metadata.Wrappers.Add("Settings_Wrapper__Reload");
+
return Initialize("ReverseProxySettings_Edit", model =>
{
model.EnableXForwardedFor = settings.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor);
model.EnableXForwardedHost = settings.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost);
model.EnableXForwardedProto = settings.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto);
- }).Location("Content:2").OnGroup(GroupId);
+ }).Location("Content:2")
+ .OnGroup(GroupId);
}
public override async Task UpdateAsync(ReverseProxySettings section, BuildEditorContext context)
@@ -59,7 +69,7 @@ public override async Task UpdateAsync(ReverseProxySettings sect
return null;
}
- if (context.GroupId == GroupId)
+ if (context.GroupId.EqualsOrdinalIgnoreCase(GroupId))
{
var model = new ReverseProxySettingsViewModel();
diff --git a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Views/ReverseProxySettings.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Views/ReverseProxySettings.Edit.cshtml
index 43cc396d590..481381ce2d0 100644
--- a/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Views/ReverseProxySettings.Edit.cshtml
+++ b/src/OrchardCore.Modules/OrchardCore.ReverseProxy/Views/ReverseProxySettings.Edit.cshtml
@@ -4,10 +4,6 @@
@inject IClientIPAddressAccessor ClientIPAddressAccessor
-
- @T["The current tenant will be reloaded when the settings are saved."]
-
-