From 941c1c8a458f421b8f61b57cf47790dd77739579 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Tue, 18 Jul 2023 12:35:27 -0400 Subject: [PATCH 01/52] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 485645d4..37385e18 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Latest Release -[4.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.0) was released on June 26, 2023 and is a major framework upgrade to .NET 7. This release includes 104 pull requests by 5 different contributors, pushing the total number of project commits all-time over 3600. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. +[4.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.1) was released on July 18, 2023 and is a stabilization release. This release includes 68 pull requests by 8 different contributors, pushing the total number of project commits all-time over 3800. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Foqtane%2Foqtane.framework%2Fmaster%2Fazuredeploy.json) @@ -53,6 +53,9 @@ Backlog (TBD) 5.0.0 (Q4 2023) - [ ] Migration to .NET 8 +[4.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.1) ( July 18, 2023 ) +- [x] Stabilization improvements + [4.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.0) ( June 26, 2023 ) - [x] Migration to .NET 7 - [x] Improved JavaScript, CSS, and Meta support From 3a54326e738f547a019a1281c27e9ccf5248da93 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Tue, 18 Jul 2023 12:42:49 -0400 Subject: [PATCH 02/52] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37385e18..aef2106a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Latest Release -[4.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.1) was released on July 18, 2023 and is a stabilization release. This release includes 68 pull requests by 8 different contributors, pushing the total number of project commits all-time over 3800. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. +[4.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.1) was released on July 18, 2023 and is primary focused on stabilization. This release includes 68 pull requests by 8 different contributors, pushing the total number of project commits all-time over 3800. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Foqtane%2Foqtane.framework%2Fmaster%2Fazuredeploy.json) From 88c06eea6e78e978037b4e2f0a8cd91aab26973f Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 19 Jul 2023 09:58:36 +0200 Subject: [PATCH 03/52] Fixes Module Creator problem #3041 This fix is to handle a returned null from the database. This issue came to light while using Postgresql --- .../Templates/External/Client/Services/[Module]Service.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs index b6503356..f8453527 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs @@ -18,7 +18,7 @@ namespace [Owner].Module.[Module].Services public async Task> Get[Module]sAsync(int ModuleId) { List [Module]s = await GetJsonAsync>(CreateAuthorizationPolicyUrl($"{Apiurl}?moduleid={ModuleId}", EntityNames.Module, ModuleId)); - return [Module]s.OrderBy(item => item.Name).ToList(); + return [Module]s?.OrderBy(item => item.Name).ToList() ?? new(); } public async Task Get[Module]Async(int [Module]Id, int ModuleId) From 6736570ee70367af61a86b017ab4c83ad457def2 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 19 Jul 2023 15:45:12 -0400 Subject: [PATCH 04/52] FileManager modification to support ShowFolders = False --- Oqtane.Client/Modules/Controls/FileManager.razor | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor index c37cef54..f6ee48c2 100644 --- a/Oqtane.Client/Modules/Controls/FileManager.razor +++ b/Oqtane.Client/Modules/Controls/FileManager.razor @@ -168,7 +168,21 @@ ShowSuccess = true; } - _folders = await FolderService.GetFoldersAsync(ModuleState.SiteId); + if (ShowFolders) + { + _folders = await FolderService.GetFoldersAsync(ModuleState.SiteId); + } + else + { + if (FolderId != -1) + { + var folder = await FolderService.GetFolderAsync(FolderId); + if (folder != null) + { + _folders = new List { folder }; + } + } + } if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder) { From 805018286cf08444c4d7ff8e3fef2b68728e6e1d Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 19 Jul 2023 16:14:48 -0400 Subject: [PATCH 05/52] fix #3046 - user folders displayed in folder lists --- Oqtane.Server/Controllers/FolderController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Oqtane.Server/Controllers/FolderController.cs b/Oqtane.Server/Controllers/FolderController.cs index 68feab68..31121b60 100644 --- a/Oqtane.Server/Controllers/FolderController.cs +++ b/Oqtane.Server/Controllers/FolderController.cs @@ -43,7 +43,8 @@ namespace Oqtane.Controllers { foreach (Folder folder in _folders.GetFolders(SiteId)) { - if (_userPermissions.IsAuthorized(User, PermissionNames.View, folder.PermissionList)) + // note that Browse permission is used for this method + if (_userPermissions.IsAuthorized(User, PermissionNames.Browse, folder.PermissionList)) { folders.Add(folder); } From 5dea783677ae8586aad256d01d849d99d0d18dd7 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 19 Jul 2023 16:27:26 -0400 Subject: [PATCH 06/52] fix #3048 - uploading to Packages folder showing unsuccessful message --- .../Modules/Controls/FileManager.razor | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor index f6ee48c2..a4984a5f 100644 --- a/Oqtane.Client/Modules/Controls/FileManager.razor +++ b/Oqtane.Client/Modules/Controls/FileManager.razor @@ -372,10 +372,21 @@ attempts += 1; Thread.Sleep(1000 * attempts); // progressive retry - var file = await FileService.GetFileAsync(int.Parse(folder), uploads[upload]); - if (file != null) + if (Folder == Constants.PackagesFolder) { - success = true; + var files = await FileService.GetFilesAsync(folder); + if (files != null && files.Any(item => item.Name == uploads[upload])) + { + success = true; + } + } + else + { + var file = await FileService.GetFileAsync(int.Parse(folder), uploads[upload]); + if (file != null) + { + success = true; + } } } if (success) From 48f8d419936f55241f75a3f49b83b309333c7bb5 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 19 Jul 2023 20:07:27 -0400 Subject: [PATCH 07/52] disable ServiceBase logic which does not work with legacy ControllerRoutes.Default routes (modules created prior to 2.1) --- Oqtane.Client/Services/ServiceBase.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Oqtane.Client/Services/ServiceBase.cs b/Oqtane.Client/Services/ServiceBase.cs index f12c0278..fb6719a1 100644 --- a/Oqtane.Client/Services/ServiceBase.cs +++ b/Oqtane.Client/Services/ServiceBase.cs @@ -202,11 +202,11 @@ namespace Oqtane.Services private async Task CheckResponse(HttpResponseMessage response, string uri) { - if (response.IsSuccessStatusCode && uri.Contains("/api/") && !response.RequestMessage.RequestUri.AbsolutePath.Contains("/api/")) - { - await Log(uri, response.RequestMessage.Method.ToString(), response.StatusCode.ToString(), "Request {Uri} Not Mapped To An API Controller Method", uri); - return false; - } + //if (response.IsSuccessStatusCode && uri.Contains("/api/") && !response.RequestMessage.RequestUri.AbsolutePath.Contains("/api/")) + //{ + // await Log(uri, response.RequestMessage.Method.ToString(), response.StatusCode.ToString(), "Request {Uri} Not Mapped To An API Controller Method", uri); + // return false; + //} if (response.IsSuccessStatusCode) return true; if (response.StatusCode != HttpStatusCode.NoContent && response.StatusCode != HttpStatusCode.NotFound) { From 02e2aeb6d171a2696e9dd4b086103186ae3e03b1 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 20 Jul 2023 13:56:29 +0200 Subject: [PATCH 08/52] Extended control to set the Required attribute The control now allow the required attribute to be set. This will now give better UX feedback. --- .../Modules/Controls/AutoComplete.razor | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/AutoComplete.razor b/Oqtane.Client/Modules/Controls/AutoComplete.razor index b464fd20..8aca8d48 100644 --- a/Oqtane.Client/Modules/Controls/AutoComplete.razor +++ b/Oqtane.Client/Modules/Controls/AutoComplete.razor @@ -2,7 +2,7 @@ @inherits LocalizableComponent
- + @if (_results != null) {