Skip to content

Commit

Permalink
v12
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwoulfe committed Sep 19, 2023
1 parent 8c6693a commit a350c2c
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 306 deletions.
5 changes: 1 addition & 4 deletions Preflight.Site/Preflight.Site.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Content Remove="C:\Users\natha\source\repos\Preflight-11\icon.png" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="clean" Version="2.1.6" />
<PackageReference Include="Umbraco.Cms" Version="[11.0.0, 12)" />
<PackageReference Include="Umbraco.Cms" Version="[12.0.0, 13)" />
</ItemGroup>

<ItemGroup>
Expand Down
198 changes: 83 additions & 115 deletions Preflight.Site/appsettings-schema.Umbraco.Cms.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"Content": {
"$ref": "#/definitions/ContentSettings"
},
"DeliveryApi": {
"$ref": "#/definitions/DeliveryApiSettings"
},
"Debug": {
"$ref": "#/definitions/CoreDebugSettings"
},
Expand Down Expand Up @@ -216,6 +219,18 @@
"items": {
"type": "string"
}
},
"AllowedMediaHosts": {
"type": "array",
"description": "Gets or sets the allowed external host for media. If empty only relative paths are allowed.",
"items": {
"type": "string"
}
},
"ShowDomainWarnings": {
"type": "boolean",
"description": "Gets or sets a value indicating whether to show domain warnings.",
"default": true
}
}
},
Expand Down Expand Up @@ -366,6 +381,41 @@
}
}
},
"DeliveryApiSettings": {
"type": "object",
"description": "Typed configuration options for Delivery API settings.\n ",
"properties": {
"Enabled": {
"type": "boolean",
"description": "Gets or sets a value indicating whether the Delivery API should be enabled.\n ",
"default": false
},
"PublicAccess": {
"type": "boolean",
"description": "Gets or sets a value indicating whether the Delivery API (if enabled) should be\npublicly available or should require an API key for access.\n ",
"default": true
},
"ApiKey": {
"type": [
"null",
"string"
],
"description": "Gets or sets the API key used for authorizing API access (if the API is not publicly available) and preview access.\n "
},
"DisallowedContentTypeAliases": {
"type": "array",
"description": "Gets or sets the aliases of the content types that may never be exposed through the Delivery API. Content of these\ntypes will never be returned from any Delivery API endpoint, nor added to the query index.\n ",
"items": {
"type": "string"
}
},
"RichTextOutputAsJson": {
"type": "boolean",
"description": "Gets or sets a value indicating whether the Delivery API should output rich text values as JSON instead of HTML.\n ",
"default": false
}
}
},
"CoreDebugSettings": {
"type": "object",
"description": "Typed configuration options for core debug settings.\n ",
Expand Down Expand Up @@ -604,6 +654,10 @@
"description": "Force url paths to be left to right, even when the culture has right to left text",
"default": true,
"x-example": "For the following hierarchy\n- Root (/ar)\n - 1 (/ar/1)\n - 2 (/ar/1/2)\n - 3 (/ar/1/2/3)\n - 3 (/ar/1/2/3/4)\nWhen forced\n- https://www.umbraco.com/ar/1/2/3/4\nwhen not\n- https://www.umbraco.com/ar/4/3/2/1"
},
"ShowMaintenancePageWhenInUpgradeState": {
"type": "boolean",
"default": true
}
}
},
Expand Down Expand Up @@ -924,18 +978,23 @@
},
"ImagingSettings": {
"type": "object",
"description": "Typed configuration options for imaging settings.\n ",
"description": "Typed configuration options for imaging settings.",
"properties": {
"HMACSecretKey": {
"type": "string",
"description": "Gets or sets a value for the Hash-based Message Authentication Code (HMAC) secret key for request authentication.",
"format": "byte"
},
"Cache": {
"description": "Gets or sets a value for imaging cache settings.\n ",
"description": "Gets or sets a value for imaging cache settings.",
"oneOf": [
{
"$ref": "#/definitions/ImagingCacheSettings"
}
]
},
"Resize": {
"description": "Gets or sets a value for imaging resize settings.\n ",
"description": "Gets or sets a value for imaging resize settings.",
"oneOf": [
{
"$ref": "#/definitions/ImagingResizeSettings"
Expand Down Expand Up @@ -979,17 +1038,17 @@
},
"ImagingResizeSettings": {
"type": "object",
"description": "Typed configuration options for image resize settings.\n ",
"description": "Typed configuration options for image resize settings.",
"properties": {
"MaxWidth": {
"type": "integer",
"description": "Gets or sets a value for the maximim resize width.\n ",
"description": "Gets or sets a value for the maximum resize width.",
"format": "int32",
"default": 5000
},
"MaxHeight": {
"type": "integer",
"description": "Gets or sets a value for the maximim resize height.\n ",
"description": "Gets or sets a value for the maximum resize height.",
"format": "int32",
"default": 5000
}
Expand Down Expand Up @@ -1041,13 +1100,18 @@
},
"LoggingSettings": {
"type": "object",
"description": "Typed configuration options for logging settings.\n ",
"description": "Typed configuration options for logging settings.",
"properties": {
"MaxLogAge": {
"type": "string",
"description": "Gets or sets a value for the maximum age of a log file.\n ",
"description": "Gets or sets a value for the maximum age of a log file.",
"format": "duration",
"default": "1.00:00:00"
},
"Directory": {
"type": "string",
"description": "Gets or sets the folder to use for log files.",
"default": "~/umbraco/Logs"
}
}
},
Expand Down Expand Up @@ -1230,28 +1294,6 @@
"description": "Gets or sets the set of allowed characters for a username\n ",
"default": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+\\"
},
"UserPassword": {
"description": "Gets or sets a value for the user password settings.\n ",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/UserPasswordConfigurationSettings"
}
]
},
"MemberPassword": {
"description": "Gets or sets a value for the member password settings.\n ",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/MemberPasswordConfigurationSettings"
}
]
},
"MemberBypassTwoFactorForExternalLogins": {
"type": "boolean",
"description": "Gets or sets a value indicating whether to bypass the two factor requirement in Umbraco when using external login\nfor members. Thereby rely on the External login and potential 2FA at that provider.\n ",
Expand All @@ -1261,92 +1303,18 @@
"type": "boolean",
"description": "Gets or sets a value indicating whether to bypass the two factor requirement in Umbraco when using external login\nfor users. Thereby rely on the External login and potential 2FA at that provider.\n ",
"default": true
}
}
},
"UserPasswordConfigurationSettings": {
"type": "object",
"description": "Typed configuration options for user password settings.\n ",
"properties": {
"RequiredLength": {
"type": "integer",
"description": "Gets a value for the minimum required length for the password.\n ",
"format": "int32",
"default": 10
},
"RequireNonLetterOrDigit": {
"type": "boolean",
"description": "Gets a value indicating whether at least one non-letter or digit is required for the password.\n ",
"default": false
},
"RequireDigit": {
"type": "boolean",
"description": "Gets a value indicating whether at least one digit is required for the password.\n ",
"default": false
},
"RequireLowercase": {
"type": "boolean",
"description": "Gets a value indicating whether at least one lower-case character is required for the password.\n ",
"default": false
},
"RequireUppercase": {
"type": "boolean",
"description": "Gets a value indicating whether at least one upper-case character is required for the password.\n ",
"default": false
},
"HashAlgorithmType": {
"type": "string",
"description": "Gets a value for the password hash algorithm type.\n ",
"default": "PBKDF2.ASPNETCORE.V3"
},
"MaxFailedAccessAttemptsBeforeLockout": {
"type": "integer",
"description": "Gets a value for the maximum failed access attempts before lockout.\n ",
"format": "int32",
"default": 5
}
}
},
"MemberPasswordConfigurationSettings": {
"type": "object",
"description": "Typed configuration options for member password settings.\n ",
"properties": {
"RequiredLength": {
"MemberDefaultLockoutTimeInMinutes": {
"type": "integer",
"description": "Gets a value for the minimum required length for the password.\n ",
"description": "Gets or sets a value for how long (in minutes) a member is locked out when a lockout occurs.\n ",
"format": "int32",
"default": 10
},
"RequireNonLetterOrDigit": {
"type": "boolean",
"description": "Gets a value indicating whether at least one non-letter or digit is required for the password.\n ",
"default": false
},
"RequireDigit": {
"type": "boolean",
"description": "Gets a value indicating whether at least one digit is required for the password.\n ",
"default": false
},
"RequireLowercase": {
"type": "boolean",
"description": "Gets a value indicating whether at least one lower-case character is required for the password.\n ",
"default": false
},
"RequireUppercase": {
"type": "boolean",
"description": "Gets a value indicating whether at least one upper-case character is required for the password.\n ",
"default": false
},
"HashAlgorithmType": {
"type": "string",
"description": "Gets a value for the password hash algorithm type.\n ",
"default": "PBKDF2.ASPNETCORE.V3"
"default": 43200
},
"MaxFailedAccessAttemptsBeforeLockout": {
"UserDefaultLockoutTimeInMinutes": {
"type": "integer",
"description": "Gets a value for the maximum failed access attempts before lockout.\n ",
"description": "Gets or sets a value for how long (in minutes) a user is locked out when a lockout occurs.\n ",
"format": "int32",
"default": 5
"default": 43200
}
}
},
Expand Down Expand Up @@ -1515,32 +1483,32 @@
"properties": {
"Commands": {
"type": "array",
"description": "HTML RichText Editor TinyMCE Commands\n ",
"description": "HTML RichText Editor TinyMCE Commands.\n ",
"items": {
"$ref": "#/definitions/RichTextEditorCommand"
}
},
"Plugins": {
"type": "array",
"description": "HTML RichText Editor TinyMCE Plugins\n ",
"description": "HTML RichText Editor TinyMCE Plugins.\n ",
"items": {
"type": "string"
}
},
"CustomConfig": {
"type": "object",
"description": "HTML RichText Editor TinyMCE Custom Config\n ",
"description": "HTML RichText Editor TinyMCE Custom Config.\n ",
"additionalProperties": {
"type": "string"
}
},
"ValidElements": {
"type": "string",
"default": "+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],figure,figcaption,video[*],audio[*],picture[*],source[*],canvas[*]"
"default": "+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-s[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],figure,figcaption,cite,video[*],audio[*],picture[*],source[*],canvas[*]"
},
"InvalidElements": {
"type": "string",
"description": "Invalid HTML elements for RichText Editor\n ",
"description": "Invalid HTML elements for RichText Editor.\n ",
"default": "font"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Preflight/Backoffice/gulp/config.outputPath.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const outputPath = '../obj/Release/net7.0/clientassets'
export const outputPath = '../obj/Debug/net7.0/clientassets'
5 changes: 1 addition & 4 deletions src/Preflight/Handlers/ContentSavingHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ internal sealed class ContentSavingHandler : INotificationHandler<ContentSavingN
{
private readonly IContentSavingExecutor _executor;

public ContentSavingHandler(IContentSavingExecutor executor)
{
_executor = executor ?? throw new System.ArgumentNullException(nameof(executor));
}
public ContentSavingHandler(IContentSavingExecutor executor) => _executor = executor ?? throw new ArgumentNullException(nameof(executor));

public void Handle(ContentSavingNotification notification)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Preflight/Preflight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<ItemGroup>
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[11.0.0, 12)" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[11.0.0, 12)" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[12.0.0, 13)" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="[12.0.0, 13)" />
</ItemGroup>

<Import Project="build\Microsoft.AspNetCore.ClientAssets.targets" />
Expand Down
Loading

0 comments on commit a350c2c

Please sign in to comment.