From af1eebbf0de2329735cb9c00cbe9860c9cf8aa3d Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 07:45:10 -0500 Subject: [PATCH 1/6] update copyright content --- .../Infrastructure/SiteTemplates/DefaultSiteTemplate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs index 3dd8ab3f..e21629d8 100644 --- a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs +++ b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs @@ -65,7 +65,7 @@ namespace Oqtane.SiteTemplates new Permission(PermissionNames.View, RoleNames.Admin, true), new Permission(PermissionNames.Edit, RoleNames.Admin, true) }.EncodePermissions(), - Content = "

Copyright (c) 2019-2020 .NET Foundation

" + + Content = "

Copyright (c) 2019-2021 .NET Foundation

" + "

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

" + "

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

" + "

THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

" From 99665800c4d146fd5545fb5dc7807c071ab90ef1 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 07:48:16 -0500 Subject: [PATCH 2/6] remove SVG from allowable upload files --- Oqtane.Shared/Shared/Constants.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Shared/Shared/Constants.cs b/Oqtane.Shared/Shared/Constants.cs index 51e71450..613f3f39 100644 --- a/Oqtane.Shared/Shared/Constants.cs +++ b/Oqtane.Shared/Shared/Constants.cs @@ -55,8 +55,8 @@ namespace Oqtane.Shared { [Obsolete(RoleObsoleteMessage)] public const string RegisteredRole = RoleNames.Registered; - public const string ImageFiles = "jpg,jpeg,jpe,gif,bmp,png,svg,ico"; - public const string UploadableFiles = "jpg,jpeg,jpe,gif,bmp,png,svg,ico,mov,wmv,avi,mp4,mp3,doc,docx,xls,xlsx,ppt,pptx,pdf,txt,zip,nupkg,csv"; + public const string ImageFiles = "jpg,jpeg,jpe,gif,bmp,png,ico"; + public const string UploadableFiles = ImageFiles + ",mov,wmv,avi,mp4,mp3,doc,docx,xls,xlsx,ppt,pptx,pdf,txt,zip,nupkg,csv"; public const string ReservedDevices = "CON,NUL,PRN,COM0,COM1,COM2,COM3,COM4,COM5,COM6,COM7,COM8,COM9,LPT0,LPT1,LPT2,LPT3,LPT4,LPT5,LPT6,LPT7,LPT8,LPT9,CONIN$,CONOUT$"; public static readonly char[] InvalidFileNameChars = From 8762809a832e9fba7b72e28147413075e7d5861d Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 08:04:39 -0500 Subject: [PATCH 3/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d0bb04c..bd6646dd 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ This project is a work in progress and the schedule for implementing enhancement V.2.1.0 ( Q1 2021 ) - [x] Complete Static Localization of Admin UI -- [ ] Cross Platform Database Support ( ie. SQLite ) -- [ ] EF Core Migrations for Database Installation/Upgrade +- [ ] Cross Platform Database Support ( ie. SQLite ) - see #964 +- [ ] EF Core Migrations for Database Installation/Upgrade - see #964 V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 ) - [x] Migration to .NET 5 From ba54076c614cce389022157a94c78b46d389abd2 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 08:04:44 -0500 Subject: [PATCH 4/6] Prepare for 2.0.1 release --- Oqtane.Client/Oqtane.Client.csproj | 4 ++-- Oqtane.Package/Oqtane.Client.nuspec | 4 ++-- Oqtane.Package/Oqtane.Framework.nuspec | 4 ++-- Oqtane.Package/Oqtane.Server.nuspec | 4 ++-- Oqtane.Package/Oqtane.Shared.nuspec | 4 ++-- Oqtane.Package/install.ps1 | 2 +- Oqtane.Package/upgrade.ps1 | 2 +- Oqtane.Server/Oqtane.Server.csproj | 4 ++-- Oqtane.Shared/Oqtane.Shared.csproj | 4 ++-- Oqtane.Shared/Shared/Constants.cs | 4 ++-- Oqtane.Test/Oqtane.Test.csproj | 4 ++-- Oqtane.Upgrade/Oqtane.Upgrade.csproj | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj index 72024f75..f6ce11c8 100644 --- a/Oqtane.Client/Oqtane.Client.csproj +++ b/Oqtane.Client/Oqtane.Client.csproj @@ -5,7 +5,7 @@ Exe 3.0 Debug;Release - 2.0.0 + 2.0.1 Oqtane Shaun Walker .NET Foundation @@ -14,7 +14,7 @@ https://www.oqtane.org https://github.com/oqtane Git - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 Oqtane true true diff --git a/Oqtane.Package/Oqtane.Client.nuspec b/Oqtane.Package/Oqtane.Client.nuspec index 6b01cba1..c669a8a2 100644 --- a/Oqtane.Package/Oqtane.Client.nuspec +++ b/Oqtane.Package/Oqtane.Client.nuspec @@ -2,7 +2,7 @@ Oqtane.Client - 2.0.0 + 2.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -13,7 +13,7 @@ https://github.com/oqtane/oqtane.framework https://www.oqtane.org/Portals/0/icon.jpg oqtane - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 A modular application framework for Blazor diff --git a/Oqtane.Package/Oqtane.Framework.nuspec b/Oqtane.Package/Oqtane.Framework.nuspec index 10313bc4..6e68fa19 100644 --- a/Oqtane.Package/Oqtane.Framework.nuspec +++ b/Oqtane.Package/Oqtane.Framework.nuspec @@ -2,7 +2,7 @@ Oqtane.Framework - 2.0.0 + 2.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -13,7 +13,7 @@ https://github.com/oqtane/oqtane.framework https://www.oqtane.org/Portals/0/icon.jpg oqtane framework - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 A modular application framework for Blazor diff --git a/Oqtane.Package/Oqtane.Server.nuspec b/Oqtane.Package/Oqtane.Server.nuspec index 36715c37..6adfcb6b 100644 --- a/Oqtane.Package/Oqtane.Server.nuspec +++ b/Oqtane.Package/Oqtane.Server.nuspec @@ -2,7 +2,7 @@ Oqtane.Server - 2.0.0 + 2.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -13,7 +13,7 @@ https://github.com/oqtane/oqtane.framework https://www.oqtane.org/Portals/0/icon.jpg oqtane - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 A modular application framework for Blazor diff --git a/Oqtane.Package/Oqtane.Shared.nuspec b/Oqtane.Package/Oqtane.Shared.nuspec index 538e0c8d..59a93473 100644 --- a/Oqtane.Package/Oqtane.Shared.nuspec +++ b/Oqtane.Package/Oqtane.Shared.nuspec @@ -2,7 +2,7 @@ Oqtane.Shared - 2.0.0 + 2.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -13,7 +13,7 @@ https://github.com/oqtane/oqtane.framework https://www.oqtane.org/Portals/0/icon.jpg oqtane - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 A modular application framework for Blazor diff --git a/Oqtane.Package/install.ps1 b/Oqtane.Package/install.ps1 index 116d8567..d4b21d97 100644 --- a/Oqtane.Package/install.ps1 +++ b/Oqtane.Package/install.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net5.0\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.2.0.0.Install.zip" -Force \ No newline at end of file +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net5.0\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.2.0.1.Install.zip" -Force \ No newline at end of file diff --git a/Oqtane.Package/upgrade.ps1 b/Oqtane.Package/upgrade.ps1 index e41001aa..57e1de1a 100644 --- a/Oqtane.Package/upgrade.ps1 +++ b/Oqtane.Package/upgrade.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net5.0\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.2.0.0.Upgrade.zip" -Force \ No newline at end of file +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net5.0\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.2.0.1.Upgrade.zip" -Force \ No newline at end of file diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 474b9335..4a6802f5 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -3,7 +3,7 @@ net5.0 Debug;Release - 2.0.0 + 2.0.1 Oqtane Shaun Walker .NET Foundation @@ -12,7 +12,7 @@ https://www.oqtane.org https://github.com/oqtane Git - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 Oqtane true diff --git a/Oqtane.Shared/Oqtane.Shared.csproj b/Oqtane.Shared/Oqtane.Shared.csproj index 976f255b..65df5df5 100644 --- a/Oqtane.Shared/Oqtane.Shared.csproj +++ b/Oqtane.Shared/Oqtane.Shared.csproj @@ -3,7 +3,7 @@ net5.0 Debug;Release - 2.0.0 + 2.0.1 Oqtane Shaun Walker .NET Foundation @@ -12,7 +12,7 @@ https://www.oqtane.org https://github.com/oqtane Git - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 Oqtane true diff --git a/Oqtane.Shared/Shared/Constants.cs b/Oqtane.Shared/Shared/Constants.cs index 613f3f39..1b05a7e7 100644 --- a/Oqtane.Shared/Shared/Constants.cs +++ b/Oqtane.Shared/Shared/Constants.cs @@ -5,8 +5,8 @@ namespace Oqtane.Shared { public class Constants { public const string PackageId = "Oqtane.Framework"; - public const string Version = "2.0.0"; - public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0"; + public const string Version = "2.0.1"; + public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1"; public const string PageComponent = "Oqtane.UI.ThemeBuilder, Oqtane.Client"; public const string ContainerComponent = "Oqtane.UI.ContainerBuilder, Oqtane.Client"; diff --git a/Oqtane.Test/Oqtane.Test.csproj b/Oqtane.Test/Oqtane.Test.csproj index 78c230db..da295fb4 100644 --- a/Oqtane.Test/Oqtane.Test.csproj +++ b/Oqtane.Test/Oqtane.Test.csproj @@ -3,7 +3,7 @@ net5.0 Debug;Release - 2.0.0 + 2.0.1 Oqtane Shaun Walker .NET Foundation @@ -12,7 +12,7 @@ https://www.oqtane.org https://github.com/oqtane Git - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 Oqtane false diff --git a/Oqtane.Upgrade/Oqtane.Upgrade.csproj b/Oqtane.Upgrade/Oqtane.Upgrade.csproj index cd3d0a4c..f67d23d2 100644 --- a/Oqtane.Upgrade/Oqtane.Upgrade.csproj +++ b/Oqtane.Upgrade/Oqtane.Upgrade.csproj @@ -3,7 +3,7 @@ net5.0 Exe - 2.0.0 + 2.0.1 Oqtane Shaun Walker .NET Foundation @@ -12,7 +12,7 @@ https://www.oqtane.org https://github.com/oqtane Git - https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v2.0.1 Oqtane false From 5b9196cfd4b030067d4aaa8aa34315e78b60ce56 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 08:05:36 -0500 Subject: [PATCH 5/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd6646dd..5788b1db 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ This project is a work in progress and the schedule for implementing enhancement V.2.1.0 ( Q1 2021 ) - [x] Complete Static Localization of Admin UI -- [ ] Cross Platform Database Support ( ie. SQLite ) - see #964 -- [ ] EF Core Migrations for Database Installation/Upgrade - see #964 +- [ ] Cross Platform Database Support ( ie. SQLite ) - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) +- [ ] EF Core Migrations for Database Installation/Upgrade - see [#964](https://github.com/oqtane/oqtane.framework/discussions/964) V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 ) - [x] Migration to .NET 5 From 12fd845ed593d920e82b940de2f51ba7383382db Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 26 Feb 2021 09:08:25 -0500 Subject: [PATCH 6/6] Fix issue when creating assets.json and folder does not exist. Improve module/theme uninstall to remove empty folders. --- Oqtane.Server/Controllers/ModuleDefinitionController.cs | 5 +++++ Oqtane.Server/Controllers/ThemeController.cs | 5 +++++ Oqtane.Server/Infrastructure/InstallationManager.cs | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/Oqtane.Server/Controllers/ModuleDefinitionController.cs b/Oqtane.Server/Controllers/ModuleDefinitionController.cs index dc371214..f417ce33 100644 --- a/Oqtane.Server/Controllers/ModuleDefinitionController.cs +++ b/Oqtane.Server/Controllers/ModuleDefinitionController.cs @@ -135,6 +135,7 @@ namespace Oqtane.Controllers { // use assets.json to clean up file resources List assets = JsonSerializer.Deserialize>(System.IO.File.ReadAllText(Path.Combine(assetpath, "assets.json"))); + assets.Reverse(); foreach(string asset in assets) { // legacy support for assets that were stored as absolute paths @@ -142,6 +143,10 @@ namespace Oqtane.Controllers if (System.IO.File.Exists(filepath)) { System.IO.File.Delete(filepath); + if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) + { + Directory.Delete(Path.GetDirectoryName(filepath)); + } } } _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Module Assets Removed For {ModuleDefinitionName}", moduledefinition.ModuleDefinitionName); diff --git a/Oqtane.Server/Controllers/ThemeController.cs b/Oqtane.Server/Controllers/ThemeController.cs index 615080e9..851aeb68 100644 --- a/Oqtane.Server/Controllers/ThemeController.cs +++ b/Oqtane.Server/Controllers/ThemeController.cs @@ -63,6 +63,7 @@ namespace Oqtane.Controllers { // use assets.json to clean up file resources List assets = JsonSerializer.Deserialize>(System.IO.File.ReadAllText(Path.Combine(assetpath, "assets.json"))); + assets.Reverse(); foreach (string asset in assets) { // legacy support for assets that were stored as absolute paths @@ -70,6 +71,10 @@ namespace Oqtane.Controllers if (System.IO.File.Exists(filepath)) { System.IO.File.Delete(filepath); + if (!Directory.EnumerateFiles(Path.GetDirectoryName(filepath)).Any()) + { + Directory.Delete(Path.GetDirectoryName(filepath)); + } } } _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Theme Assets Removed For {ThemeName}", theme.ThemeName); diff --git a/Oqtane.Server/Infrastructure/InstallationManager.cs b/Oqtane.Server/Infrastructure/InstallationManager.cs index f14e8ae1..3b627c70 100644 --- a/Oqtane.Server/Infrastructure/InstallationManager.cs +++ b/Oqtane.Server/Infrastructure/InstallationManager.cs @@ -126,6 +126,10 @@ namespace Oqtane.Infrastructure { File.Delete(manifestpath); } + if (!Directory.Exists(Path.GetDirectoryName(manifestpath))) + { + Directory.CreateDirectory(Path.GetDirectoryName(manifestpath)); + } File.WriteAllText(manifestpath, JsonSerializer.Serialize(assets)); } }