Back to 10.2.0-ish

This commit is contained in:
Sebastiaan Janssen
2022-09-19 16:14:16 +02:00
parent 8de26c6098
commit 87c06f5f98
296 changed files with 4106 additions and 3401 deletions

View File

@@ -157,7 +157,6 @@ public class ContentSettings
internal const bool StaticHideBackOfficeLogo = false;
internal const bool StaticDisableDeleteWhenReferenced = false;
internal const bool StaticDisableUnpublishWhenReferenced = false;
internal const bool StaticAllowEditInvariantFromNonDefault = false;
/// <summary>
/// Gets or sets a value for the content notification settings.
@@ -243,10 +242,4 @@ public class ContentSettings
/// Get or sets the model representing the global content version cleanup policy
/// </summary>
public ContentVersionCleanupPolicySettings ContentVersionCleanupPolicy { get; set; } = new();
/// <summary>
/// Gets or sets a value indicating whether to allow editing invariant properties from a non-default language variation.
/// </summary>
[DefaultValue(StaticAllowEditInvariantFromNonDefault)]
public bool AllowEditInvariantFromNonDefault { get; set; } = StaticAllowEditInvariantFromNonDefault;
}

View File

@@ -19,36 +19,30 @@ public class RequestHandlerSettings
internal static readonly CharItem[] DefaultCharCollection =
{
new() { Char = " ", Replacement = "-" },
new() { Char = "\"", Replacement = string.Empty },
new() { Char = "'", Replacement = string.Empty },
new() { Char = "%", Replacement = string.Empty },
new() { Char = ".", Replacement = string.Empty },
new() { Char = ";", Replacement = string.Empty },
new() { Char = "/", Replacement = string.Empty },
new() { Char = "\\", Replacement = string.Empty },
new() { Char = ":", Replacement = string.Empty },
new() { Char = "#", Replacement = string.Empty },
new() { Char = "&", Replacement = string.Empty },
new() { Char = "?", Replacement = string.Empty },
new() { Char = "<", Replacement = string.Empty },
new() { Char = ">", Replacement = string.Empty },
new() { Char = "+", Replacement = "plus" },
new() { Char = "*", Replacement = "star" },
new() { Char = "æ", Replacement = "ae" },
new() { Char = "Æ", Replacement = "ae" },
new() { Char = "ä", Replacement = "ae" },
new() { Char = "Ä", Replacement = "ae" },
new() { Char = "ø", Replacement = "oe" },
new() { Char = "Ø", Replacement = "oe" },
new() { Char = "ö", Replacement = "oe" },
new() { Char = "Ö", Replacement = "oe" },
new() { Char = "å", Replacement = "aa" },
new() { Char = "Å", Replacement = "aa" },
new() { Char = "ü", Replacement = "ue" },
new() { Char = "Ü", Replacement = "ue" },
new() { Char = "ß", Replacement = "ss" },
new() { Char = "|", Replacement = "-" },
new () { Char = " ", Replacement = "-" },
new () { Char = "\"", Replacement = string.Empty },
new () { Char = "'", Replacement = string.Empty },
new () { Char = "%", Replacement = string.Empty },
new () { Char = ".", Replacement = string.Empty },
new () { Char = ";", Replacement = string.Empty },
new () { Char = "/", Replacement = string.Empty },
new () { Char = "\\", Replacement = string.Empty },
new () { Char = ":", Replacement = string.Empty },
new () { Char = "#", Replacement = string.Empty },
new () { Char = "+", Replacement = "plus" },
new () { Char = "*", Replacement = "star" },
new () { Char = "&", Replacement = string.Empty },
new () { Char = "?", Replacement = string.Empty },
new () { Char = "æ", Replacement = "ae" },
new () { Char = "ä", Replacement = "ae" },
new () { Char = "ø", Replacement = "oe" },
new () { Char = "ö", Replacement = "oe" },
new () { Char = "å", Replacement = "aa" },
new () { Char = "ü", Replacement = "ue" },
new () { Char = "ß", Replacement = "ss" },
new () { Char = "|", Replacement = "-" },
new () { Char = "<", Replacement = string.Empty },
new () { Char = ">", Replacement = string.Empty },
};
/// <summary>
@@ -79,6 +73,13 @@ public class RequestHandlerSettings
[DefaultValue(StaticEnableDefaultCharReplacements)]
public bool EnableDefaultCharReplacements { get; set; } = StaticEnableDefaultCharReplacements;
/// <summary>
/// Add additional character replacements, or override defaults
/// </summary>
[Obsolete(
"Use the GetCharReplacements extension method in the Umbraco.Extensions namespace instead. Scheduled for removal in V11")]
public IEnumerable<IChar> CharCollection { get; set; } = DefaultCharCollection;
/// <summary>
/// Add additional character replacements, or override defaults
/// </summary>

View File

@@ -86,10 +86,9 @@ public class SecuritySettings
[DefaultValue(StaticUserBypassTwoFactorForExternalLogins)]
public bool UserBypassTwoFactorForExternalLogins { get; set; } = StaticUserBypassTwoFactorForExternalLogins;
/// <summary>
/// Gets or sets a value indicating whether to allow editing invariant properties from a non-default language variation.
/// </summary>
[Obsolete("Use ContentSettings.AllowEditFromInvariant instead")]
[DefaultValue(StaticAllowEditInvariantFromNonDefault)]
public bool AllowEditInvariantFromNonDefault { get; set; } = StaticAllowEditInvariantFromNonDefault;
/// <summary>
/// Gets or sets a value indicating whether to allow editing invariant properties from a non-default language variation.
/// </summary>
[DefaultValue(StaticAllowEditInvariantFromNonDefault)]
public bool AllowEditInvariantFromNonDefault { get; set; } = StaticAllowEditInvariantFromNonDefault;
}

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Core.Configuration.Models.Validation;
public class ContentSettingsValidator : ConfigurationValidatorBase, IValidateOptions<ContentSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string? name, ContentSettings options)
public ValidateOptionsResult Validate(string name, ContentSettings options)
{
if (!ValidateError404Collection(options.Error404Collection, out var message))
{

View File

@@ -12,7 +12,7 @@ public class GlobalSettingsValidator
: ConfigurationValidatorBase, IValidateOptions<GlobalSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string? name, GlobalSettings options)
public ValidateOptionsResult Validate(string name, GlobalSettings options)
{
if (!ValidateSmtpSetting(options.Smtp, out var message))
{

View File

@@ -19,7 +19,7 @@ public class HealthChecksSettingsValidator : ConfigurationValidatorBase, IValida
public HealthChecksSettingsValidator(ICronTabParser cronTabParser) => _cronTabParser = cronTabParser;
/// <inheritdoc />
public ValidateOptionsResult Validate(string? name, HealthChecksSettings options)
public ValidateOptionsResult Validate(string name, HealthChecksSettings options)
{
if (!ValidateNotificationFirstRunTime(options.Notification.FirstRunTime, out var message))
{

View File

@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Core.Configuration.Models.Validation;
public class RequestHandlerSettingsValidator : ConfigurationValidatorBase, IValidateOptions<RequestHandlerSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string? name, RequestHandlerSettings options)
public ValidateOptionsResult Validate(string name, RequestHandlerSettings options)
{
if (!ValidateConvertUrlsToAscii(options.ConvertUrlsToAscii, out var message))
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Microsoft.Extensions.Options;
@@ -12,7 +12,7 @@ public class UnattendedSettingsValidator
: IValidateOptions<UnattendedSettings>
{
/// <inheritdoc />
public ValidateOptionsResult Validate(string? name, UnattendedSettings options)
public ValidateOptionsResult Validate(string name, UnattendedSettings options)
{
if (options.InstallUnattended)
{