From cc65555c3dcc6e51dd04512f041615911a55ef75 Mon Sep 17 00:00:00 2001 From: Mark Davis Date: Tue, 5 Dec 2023 12:17:02 -0800 Subject: [PATCH 01/74] minor fix to routing --- Oqtane.Server/Pages/_Host.cshtml.cs | 2 +- Oqtane.Server/appsettings.json | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Oqtane.Server/Pages/_Host.cshtml.cs b/Oqtane.Server/Pages/_Host.cshtml.cs index 50fb2575..a451f5a0 100644 --- a/Oqtane.Server/Pages/_Host.cshtml.cs +++ b/Oqtane.Server/Pages/_Host.cshtml.cs @@ -505,7 +505,7 @@ namespace Oqtane.Pages { if (resource.Url.StartsWith("~")) { - resource.Url = resource.Url.Replace("~", "/Themes/" + name + "/").Replace("//", "/"); + resource.Url = resource.Url.Replace("~", "/Themes/" + Utilities.GetTypeName(name) + "/").Replace("//", "/"); } if (!resource.Url.Contains("://") && alias.BaseUrl != "" && !resource.Url.StartsWith(alias.BaseUrl)) { diff --git a/Oqtane.Server/appsettings.json b/Oqtane.Server/appsettings.json index ccf00c5c..2c4c7f58 100644 --- a/Oqtane.Server/appsettings.json +++ b/Oqtane.Server/appsettings.json @@ -2,10 +2,10 @@ "Runtime": "Server", "RenderMode": "ServerPrerendered", "Database": { - "DefaultDBType": "" + "DefaultDBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer" }, "ConnectionStrings": { - "DefaultConnection": "" + "DefaultConnection": "Data Source=pmc-sql.database.windows.net;Initial Catalog=pmc-cart-dev-sqldb;User ID=sql-dev-pmc;Password=1PwdCartCode!;Encrypt=false;TrustServerCertificate=false;" }, "Installation": { "DefaultAlias": "", @@ -54,5 +54,6 @@ "LogLevel": { "Default": "Information" } - } -} + }, + "InstallationId": "c6f298a3-7a64-419e-89ca-4d73946a53fe" +} \ No newline at end of file From 7b7e64576f44206896402fc3735cf85b89d8f730 Mon Sep 17 00:00:00 2001 From: Mark Davis <311063+markdav-is@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:30:20 -0800 Subject: [PATCH 02/74] Update appsettings.json --- Oqtane.Server/appsettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Server/appsettings.json b/Oqtane.Server/appsettings.json index 2c4c7f58..6d3d01af 100644 --- a/Oqtane.Server/appsettings.json +++ b/Oqtane.Server/appsettings.json @@ -5,7 +5,7 @@ "DefaultDBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer" }, "ConnectionStrings": { - "DefaultConnection": "Data Source=pmc-sql.database.windows.net;Initial Catalog=pmc-cart-dev-sqldb;User ID=sql-dev-pmc;Password=1PwdCartCode!;Encrypt=false;TrustServerCertificate=false;" + "DefaultConnection": "" }, "Installation": { "DefaultAlias": "", @@ -56,4 +56,4 @@ } }, "InstallationId": "c6f298a3-7a64-419e-89ca-4d73946a53fe" -} \ No newline at end of file +} From e2c404d8bb1008d8e6b8681a1b32d177d8995071 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:18:30 -0700 Subject: [PATCH 03/74] Adds await ScrollToPageTop(); to error messages + Page Name Error Message - Adds await ScrollToPageTop(); to error messages - Adds Blank Page Name Error Message --- Oqtane.Client/Modules/Admin/Pages/Edit.razor | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Admin/Pages/Edit.razor b/Oqtane.Client/Modules/Admin/Pages/Edit.razor index 0d408c03..62120623 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Edit.razor @@ -466,7 +466,7 @@ _parentid = (string)e.Value; _children = new List(); foreach (Page p in _pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid)))) - { + { if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList)) { _children.Add(p); @@ -479,6 +479,7 @@ { await logger.LogError(ex, "Error Loading Child Pages For Parent {PageId} {Error}", _parentid, ex.Message); AddModuleMessage(Localizer["Error.ChildPage.Load"], MessageType.Error); + await ScrollToPageTop(); } } @@ -494,6 +495,7 @@ if (ThemeService.GetTheme(PageState.Site.Themes, _themetype)?.ThemeName != ThemeService.GetTheme(PageState.Site.Themes, PageState.Site.DefaultThemeType)?.ThemeName) { AddModuleMessage(Localizer["ThemeChanged.Message"], MessageType.Warning); + await ScrollToPageTop(); } } @@ -531,6 +533,7 @@ if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate)) { AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning); + await ScrollToPageTop(); return; } if (!string.IsNullOrEmpty(_themetype) && _containertype != "-") @@ -581,12 +584,14 @@ if (_pages.Any(item => item.Path == _page.Path && item.PageId != _page.PageId)) { AddModuleMessage(string.Format(Localizer["Mesage.Page.PathExists"], _path), MessageType.Warning); + await ScrollToPageTop(); return; } if (_page.ParentId == null && Constants.ReservedRoutes.Contains(_page.Name.ToLower())) { AddModuleMessage(string.Format(Localizer["Message.Page.Reserved"], _page.Name), MessageType.Warning); + await ScrollToPageTop(); return; } @@ -671,17 +676,28 @@ else { AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); + if (string.IsNullOrEmpty(_name)) + { + AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); + } + await ScrollToPageTop(); } } catch (Exception ex) { await logger.LogError(ex, "Error Saving Page {Page} {Error}", _page, ex.Message); AddModuleMessage(Localizer["Error.Page.Save"], MessageType.Error); + await ScrollToPageTop(); } } else { AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); + if (string.IsNullOrEmpty(_name)) + { + AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); + } + await ScrollToPageTop(); } } From 15867a7807e38e87a1528ff968882bab3bb5092b Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:23:29 -0700 Subject: [PATCH 04/74] Adds await ScrollToPageTop(); to error messages + Page Name Error Message --- Oqtane.Client/Modules/Admin/Pages/Add.razor | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Oqtane.Client/Modules/Admin/Pages/Add.razor b/Oqtane.Client/Modules/Admin/Pages/Add.razor index ac7f064c..006f850b 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Add.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Add.razor @@ -316,6 +316,7 @@ { await logger.LogError(ex, "Error Loading Child Pages For Parent {PageId} {Error}", _parentid, ex.Message); AddModuleMessage(Localizer["Error.ChildPage.Load"], MessageType.Error); + await ScrollToPageTop(); } } @@ -330,6 +331,7 @@ if (ThemeService.GetTheme(PageState.Site.Themes, _themetype)?.ThemeName != ThemeService.GetTheme(PageState.Site.Themes, PageState.Site.DefaultThemeType)?.ThemeName) { AddModuleMessage(Localizer["ThemeChanged.Message"], MessageType.Warning); + await ScrollToPageTop(); } } @@ -345,6 +347,7 @@ if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate)) { AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning); + await ScrollToPageTop(); return; } if (!string.IsNullOrEmpty(_themetype) && !string.IsNullOrEmpty(_containertype)) @@ -395,12 +398,14 @@ if (_pages.Any(item => item.Path == page.Path)) { AddModuleMessage(string.Format(Localizer["Message.Page.Exists"], _path), MessageType.Warning); + await ScrollToPageTop(); return; } if (page.ParentId == null && Constants.ReservedRoutes.Contains(page.Name.ToLower())) { AddModuleMessage(string.Format(Localizer["Message.Page.Reserved"], page.Name), MessageType.Warning); + await ScrollToPageTop(); return; } @@ -468,6 +473,11 @@ else { AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); + if (string.IsNullOrEmpty(_name)) + { + AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); + } + await ScrollToPageTop(); } } @@ -475,11 +485,17 @@ { await logger.LogError(ex, "Error Saving Page {Page} {Error}", page, ex.Message); AddModuleMessage(Localizer["Error.Page.Save"], MessageType.Error); + await ScrollToPageTop(); } } else { AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); + if (string.IsNullOrEmpty(_name)) + { + AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); + } + await ScrollToPageTop(); } } From f2f22f35e8e1906d121e519cb964077d382b8c8e Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:26:36 -0700 Subject: [PATCH 05/74] Adds Message.Required.PageName --- Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx index 9ebed89a..fb31edea 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx @@ -162,6 +162,9 @@ A page with path '{0}' already exists for this site. Page paths must be unique. You may need to check if a page with this path exists in the Recycle Bin. + + You Must Provide Page A Name + You Must Provide Page Name, Theme, and Container @@ -267,4 +270,4 @@ Expiry Date: - \ No newline at end of file + From 58c422285a37bacfffa1348bdc8b4f12d73e1419 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:28:17 -0700 Subject: [PATCH 06/74] Adds Message.Required.PageName --- Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx index 478e7616..4dbc6d31 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx @@ -156,6 +156,9 @@ You Must Provide Page Name, Theme, and Container + + You Must Provide Page A Name + Error Saving Page @@ -297,4 +300,4 @@ Expiry Date: - \ No newline at end of file + From c25cce43986c2ee3f3cf1713c6ba00f12cecbde7 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:38:16 -0700 Subject: [PATCH 07/74] Clarify Page Name Required Message --- Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx index 4dbc6d31..d998f302 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx @@ -157,7 +157,7 @@ You Must Provide Page Name, Theme, and Container - You Must Provide Page A Name + A page name is required. Please enter one. Error Saving Page From 4c937be8847ffe7533fd9168c9a2a791b776acf6 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:38:51 -0700 Subject: [PATCH 08/74] Clarify Page Name Required Message --- Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx index fb31edea..988f85ef 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx @@ -163,7 +163,7 @@ A page with path '{0}' already exists for this site. Page paths must be unique. You may need to check if a page with this path exists in the Recycle Bin. - You Must Provide Page A Name + A page name is required. Please enter one. You Must Provide Page Name, Theme, and Container From d77e8989298fb78387ecc19d2f6e820db845ceff Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 12:43:20 -0700 Subject: [PATCH 09/74] Refactor TabPanel Heading Assignment Logic - Simplified the logic for setting the Heading property in the TabPanel component. - Replaced the if-else statement with a ternary operator for improved readability and maintainability. - Ensured that the functionality remains unchanged and verified correct assignment of headings. --- Oqtane.Client/Modules/Controls/TabPanel.razor | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Oqtane.Client/Modules/Controls/TabPanel.razor b/Oqtane.Client/Modules/Controls/TabPanel.razor index 0944df4a..cff8d9e1 100644 --- a/Oqtane.Client/Modules/Controls/TabPanel.razor +++ b/Oqtane.Client/Modules/Controls/TabPanel.razor @@ -36,14 +36,7 @@ else Parent.AddTabPanel((TabPanel)this); - if (string.IsNullOrEmpty(Heading)) - { - Heading = Localize(nameof(Name), Name); - } - else - { - Heading = Localize(nameof(Heading), Heading); - } + Heading = string.IsNullOrEmpty(Heading) ? Localize(nameof(Name), Name) : Localize(nameof(Heading), Heading); } public string DisplayHeading() From 97d3764b6e61de2db67975dcb88eee75c0705240 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 13:20:52 -0700 Subject: [PATCH 10/74] Remove Blank Page Specific Error Message --- Oqtane.Client/Modules/Admin/Pages/Edit.razor | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Pages/Edit.razor b/Oqtane.Client/Modules/Admin/Pages/Edit.razor index 62120623..ebeffdb6 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Edit.razor @@ -676,10 +676,6 @@ else { AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); - if (string.IsNullOrEmpty(_name)) - { - AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); - } await ScrollToPageTop(); } } @@ -693,10 +689,6 @@ else { AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); - if (string.IsNullOrEmpty(_name)) - { - AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); - } await ScrollToPageTop(); } } From cbaebb7b7ce45bed2a68b0de44a670d68f4477a1 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 13:21:15 -0700 Subject: [PATCH 11/74] Remove Blank Page Specific Error Message --- Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx | 3 --- 1 file changed, 3 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx index d998f302..b142a19c 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Edit.resx @@ -156,9 +156,6 @@ You Must Provide Page Name, Theme, and Container - - A page name is required. Please enter one. - Error Saving Page From 80316824f7949d96395a49ea30763021d04c6469 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 13:21:40 -0700 Subject: [PATCH 12/74] Remove Blank Page Specific Error Message --- Oqtane.Client/Modules/Admin/Pages/Add.razor | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Pages/Add.razor b/Oqtane.Client/Modules/Admin/Pages/Add.razor index 006f850b..42c0743c 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Add.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Add.razor @@ -473,10 +473,6 @@ else { AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); - if (string.IsNullOrEmpty(_name)) - { - AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); - } await ScrollToPageTop(); } @@ -491,10 +487,6 @@ else { AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); - if (string.IsNullOrEmpty(_name)) - { - AddModuleMessage(Localizer["Message.Required.PageName"], MessageType.Warning); - } await ScrollToPageTop(); } } From 784f3771b334144b802af62d9813ba146516a353 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 24 Oct 2024 13:22:08 -0700 Subject: [PATCH 13/74] Remove Blank Page Specific Error Message --- Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx | 3 --- 1 file changed, 3 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx index 988f85ef..b818eacd 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Add.resx @@ -162,9 +162,6 @@ A page with path '{0}' already exists for this site. Page paths must be unique. You may need to check if a page with this path exists in the Recycle Bin. - - A page name is required. Please enter one. - You Must Provide Page Name, Theme, and Container From 3c99006226bb4cce20bcc2fab4192c586945e489 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 14 Nov 2024 10:31:53 +0100 Subject: [PATCH 14/74] Fix for Page Management tab panel is not updating the UI. #4778 --- .../Modules/Admin/Pages/Roles/Add.resx | 144 ++++++++++++++ .../Modules/Admin/Pages/Roles/Edit.resx | 147 +++++++++++++++ .../Modules/Admin/Pages/Roles/Index.resx | 141 ++++++++++++++ .../Modules/Admin/Pages/Roles/Users.resx | 177 ++++++++++++++++++ 4 files changed, 609 insertions(+) create mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx create mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx create mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx create mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx new file mode 100644 index 00000000..c7236805 --- /dev/null +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name: + + + Error Adding Role + + + Name Of The Role + + + A Short Description Of The Role Which Describes Its Purpose + + + Indicates Whether Or Not New Users Are Automatically Assigned To This Role + + + Description: + + + Auto Assigned? + + + Please Provide All Required Information + + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx new file mode 100644 index 00000000..d4cb0b0a --- /dev/null +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name: + + + Name Of The Role + + + A Short Description Of The Role Which Describes Its Purpose + + + Indicates Whether Or Not New Users Are Automatically Assigned To This Role + + + Description: + + + Auto Assigned? + + + Error Loading Role + + + Error Saving Role + + + Please Provide All Required Information + + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx new file mode 100644 index 00000000..2c5784a8 --- /dev/null +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Are You Sure You Wish To Delete The {0} Role? + + + Error Deleting Role + + + Add Role + + + Delete Role + + + Delete + + + Edit + + + Users + + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx new file mode 100644 index 00000000..99a8f2fa --- /dev/null +++ b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + User: + + + Enter User's Name + + + Users + + + Error Loading Users + + + User Assigned To Role + + + You Must Select A User + + + Error Saving User Roles + + + User Removed From Role + + + Error Removing User From Role + + + The role you are assigning users to + + + Enter the name of a user + + + The date that this role assignment is active + + + The date that this role assignment expires + + + Role: + + + Effective Date: + + + Expiry Date: + + + Are You Sure You Wish To Remove {0} From This Role? + + + Effective + + + Expiry + + \ No newline at end of file From 702eb9e46623ba7f455d9aaa2c71d2df3c553cb7 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 14 Nov 2024 10:33:10 +0100 Subject: [PATCH 15/74] Revert "Fix for Page Management tab panel is not updating the UI. #4778" This reverts commit 3c99006226bb4cce20bcc2fab4192c586945e489. --- .../Modules/Admin/Pages/Roles/Add.resx | 144 -------------- .../Modules/Admin/Pages/Roles/Edit.resx | 147 --------------- .../Modules/Admin/Pages/Roles/Index.resx | 141 -------------- .../Modules/Admin/Pages/Roles/Users.resx | 177 ------------------ 4 files changed, 609 deletions(-) delete mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx delete mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx delete mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx delete mode 100644 Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx deleted file mode 100644 index c7236805..00000000 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Add.resx +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Name: - - - Error Adding Role - - - Name Of The Role - - - A Short Description Of The Role Which Describes Its Purpose - - - Indicates Whether Or Not New Users Are Automatically Assigned To This Role - - - Description: - - - Auto Assigned? - - - Please Provide All Required Information - - \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx deleted file mode 100644 index d4cb0b0a..00000000 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Edit.resx +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Name: - - - Name Of The Role - - - A Short Description Of The Role Which Describes Its Purpose - - - Indicates Whether Or Not New Users Are Automatically Assigned To This Role - - - Description: - - - Auto Assigned? - - - Error Loading Role - - - Error Saving Role - - - Please Provide All Required Information - - \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx deleted file mode 100644 index 2c5784a8..00000000 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Index.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Are You Sure You Wish To Delete The {0} Role? - - - Error Deleting Role - - - Add Role - - - Delete Role - - - Delete - - - Edit - - - Users - - \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx b/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx deleted file mode 100644 index 99a8f2fa..00000000 --- a/Oqtane.Client/Resources/Modules/Admin/Pages/Roles/Users.resx +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - User: - - - Enter User's Name - - - Users - - - Error Loading Users - - - User Assigned To Role - - - You Must Select A User - - - Error Saving User Roles - - - User Removed From Role - - - Error Removing User From Role - - - The role you are assigning users to - - - Enter the name of a user - - - The date that this role assignment is active - - - The date that this role assignment expires - - - Role: - - - Effective Date: - - - Expiry Date: - - - Are You Sure You Wish To Remove {0} From This Role? - - - Effective - - - Expiry - - \ No newline at end of file From db6dd5abee6dd9a7041c1eb13ca6bb082c010029 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 14 Nov 2024 10:35:15 +0100 Subject: [PATCH 16/74] Fix for TabPanel is not updating the UI. #4778 Modified that TabStrip and TabPane, now when the ActiveTab is changed the TabPanel is selected --- Oqtane.Client/Modules/Admin/Pages/Add.razor | 4 +- Oqtane.Client/Modules/Admin/Pages/Edit.razor | 34 ++++++----- Oqtane.Client/Modules/Controls/TabPanel.razor | 2 + Oqtane.Client/Modules/Controls/TabStrip.razor | 60 +++++++++++++------ 4 files changed, 66 insertions(+), 34 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Pages/Add.razor b/Oqtane.Client/Modules/Admin/Pages/Add.razor index ac7f064c..57c2c588 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Add.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Add.razor @@ -10,7 +10,7 @@ @if (_initialized) {
- +
@@ -246,6 +246,7 @@ private string _iconresources = ""; private DateTime? _effectivedate = null; private DateTime? _expirydate = null; + private string _activetab = ""; protected override async Task OnInitializedAsync() { @@ -335,6 +336,7 @@ private async Task SavePage() { + _activetab = "Settings"; validated = true; var interop = new Interop(JSRuntime); if (await interop.FormValid(form)) diff --git a/Oqtane.Client/Modules/Admin/Pages/Edit.razor b/Oqtane.Client/Modules/Admin/Pages/Edit.razor index 0d408c03..36014225 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Edit.razor @@ -16,7 +16,7 @@ @if (_page.UserId == null) { - +
@@ -30,16 +30,16 @@
- + + @foreach (Page page in _pages) + { + if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, page.PermissionList) && page.PageId != _pageId) { - if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, page.PermissionList) && page.PageId != _pageId) - { - - } + } - + } +
@@ -230,10 +230,10 @@
-   -   - @Localizer["ModuleTitle"] - @Localizer["ModuleDefinition"] +   +   + @Localizer["ModuleTitle"] + @Localizer["ModuleDefinition"]
@@ -356,6 +356,7 @@ private string _iconresources = ""; private DateTime? _effectivedate = null; private DateTime? _expirydate = null; + private string _activetab = ""; protected override async Task OnInitializedAsync() { @@ -466,7 +467,7 @@ _parentid = (string)e.Value; _children = new List(); foreach (Page p in _pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid)))) - { + { if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList)) { _children.Add(p); @@ -512,7 +513,7 @@ builder.OpenComponent(0, _themeSettingsType); builder.AddAttribute(1, "RenderModeBoundary", RenderModeBoundary); builder.AddComponentReferenceCapture(2, inst => { _themeSettings = Convert.ChangeType(inst, _themeSettingsType); }); - + builder.CloseComponent(); }; } @@ -522,6 +523,7 @@ private async Task SavePage() { + _activetab = "Settings"; validated = true; var interop = new Interop(JSRuntime); if (await interop.FormValid(form)) @@ -670,7 +672,7 @@ } else { - AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); + AddModuleMessage(Localizer["Message.Required.PageInfo"], MessageType.Warning); } } catch (Exception ex) diff --git a/Oqtane.Client/Modules/Controls/TabPanel.razor b/Oqtane.Client/Modules/Controls/TabPanel.razor index 0944df4a..5da17efb 100644 --- a/Oqtane.Client/Modules/Controls/TabPanel.razor +++ b/Oqtane.Client/Modules/Controls/TabPanel.razor @@ -30,6 +30,8 @@ else [Parameter] public SecurityAccessLevel? Security { get; set; } // optional - can be used to specify SecurityAccessLevel + public bool IsActive { get; set; } + protected override void OnParametersSet() { base.OnParametersSet(); diff --git a/Oqtane.Client/Modules/Controls/TabStrip.razor b/Oqtane.Client/Modules/Controls/TabStrip.razor index e2a3c0f1..70fc5102 100644 --- a/Oqtane.Client/Modules/Controls/TabStrip.razor +++ b/Oqtane.Client/Modules/Controls/TabStrip.razor @@ -8,18 +8,9 @@ @foreach (TabPanel tabPanel in _tabPanels) { } @@ -59,16 +50,43 @@ } } - protected override void OnParametersSet() + protected override void OnParametersSet() { + base.OnParametersSet(); + if (PageState.QueryString.ContainsKey("tab")) { ActiveTab = PageState.QueryString["tab"]; } + if (_tabPanels == null || Refresh) { _tabPanels = new List(); } + + // Ensure the active tab is valid and exists + if (!string.IsNullOrEmpty(ActiveTab) && _tabPanels.Any()) + { + var activeTabExists = _tabPanels.Any(tp => tp.Name.Equals(ActiveTab, StringComparison.OrdinalIgnoreCase)); + if (!activeTabExists) + { + ActiveTab = _tabPanels[0].Name; + } + } + + // Update the active tab in the UI + UpdateActiveTab(); + } + + private void UpdateActiveTab() + { + if (!string.IsNullOrEmpty(ActiveTab) && _tabPanels != null) + { + foreach (var tabPanel in _tabPanels) + { + tabPanel.IsActive = tabPanel.Name.Equals(ActiveTab, StringComparison.OrdinalIgnoreCase); + } + } } internal void AddTabPanel(TabPanel tabPanel) @@ -76,12 +94,20 @@ if (!_tabPanels.Exists(item => item.Name == tabPanel.Name) && IsAuthorized(tabPanel)) { _tabPanels.Add(tabPanel); + if (string.IsNullOrEmpty(ActiveTab)) + { + ActiveTab = tabPanel.Name; + } + UpdateActiveTab(); StateHasChanged(); } - if (string.IsNullOrEmpty(ActiveTab)) - { - ActiveTab = tabPanel.Name; - } + } + + private void SetActiveTab(string tabName) + { + ActiveTab = tabName; + UpdateActiveTab(); + StateHasChanged(); } private bool IsAuthorized(TabPanel tabPanel) From f780887866177f7fb665b478548914b3b23a4ea4 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 14 Nov 2024 15:46:26 -0500 Subject: [PATCH 17/74] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d7bda849..4b1adde8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Latest Release -[5.2.4](https://github.com/oqtane/oqtane.framework/releases/tag/v5.2.4) was released on October 17, 2024 and is a maintenance release including 51 pull requests by 7 different contributors, pushing the total number of project commits all-time to over 5900. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers. +[6.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0) was released on November 14, 2024 and is a major release including 39 pull requests by 6 different contributors, pushing the total number of project commits all-time to over 6000. 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) @@ -14,13 +14,13 @@ Oqtane is being developed based on some fundamental principles which are outline Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** -# Getting Started (Version 5.x) +# Getting Started (Version 6.x) **Installing using source code from the Dev/Master branch:** -- Install **[.NET 8.0.10 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)**. +- Install **[.NET 9.0.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)**. -- Install the latest edition (v17.9 or higher) of [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you wish to use LocalDB for development ( not a requirement as Oqtane supports SQLite, mySQL, and PostgreSQL ) you must also install the **Data storage and processing**. +- Install the latest edition (v17.12 or higher) of [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you wish to use LocalDB for development ( not a requirement as Oqtane supports SQLite, mySQL, and PostgreSQL ) you must also install the **Data storage and processing**. - Clone (or download) the Oqtane Master or Dev branch source code to your local system. @@ -84,7 +84,7 @@ Connect with other developers, get support, and share ideas by joining the Oqtan # Roadmap This project is open source, and therefore is a work in progress... -6.0.0 (Nov 13, 2024) +[6.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0) (Nov 14, 2024) - [x] Migration to .NET 9 [5.2.4](https://github.com/oqtane/oqtane.framework/releases/tag/v5.2.4) (Oct 17, 2024) From caa83d769f8a8503d92092eec7496227914a0333 Mon Sep 17 00:00:00 2001 From: Mark Davis <311063+markdav-is@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:27:53 -0800 Subject: [PATCH 18/74] Create CONTRIBUTING.md --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..eef872ac --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing to Oqtane + +## How to Contribute + +We track all of our issues on Github. If you want to contribute, everything starts with an issue. If you don't have an issue yet, you can add one. Then a core contributor will tag it as either an enhancement [ENH] or a bug [BUG]. Tagged issues are open for contribution. + +## Use GitHub-flow process +- Make a comment on the issue that you intend to work on it and read all the comments to gain a full understanding. +- Fork the repository +- Create a new branch and update your comment on the issue with a llink to the branch +- Make your changes and commit them +- Push to the branch +- Create a pull request + +## Reporting Bugs + +- Check if the issue has already been reported. +- Open a new issue if it hasn’t been reported. + +## Requesting Features + +- Use the feature request template in the Issues tab. + +Thank you for contributing! From d3717dbe19c62b81f05839a1038404b8dd1db3a0 Mon Sep 17 00:00:00 2001 From: Mark Davis Date: Fri, 15 Nov 2024 10:31:49 -0800 Subject: [PATCH 19/74] Remove DefaultDBType value and InstallationId from appsettings.json The commit removes the value for DefaultDBType and InstallationId from the appsettings.json file. --- Oqtane.Server/appsettings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Oqtane.Server/appsettings.json b/Oqtane.Server/appsettings.json index f8a82901..28270bab 100644 --- a/Oqtane.Server/appsettings.json +++ b/Oqtane.Server/appsettings.json @@ -2,7 +2,7 @@ "RenderMode": "Interactive", "Runtime": "Server", "Database": { - "DefaultDBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer" + "DefaultDBType": "" }, "ConnectionStrings": { "DefaultConnection": "" @@ -54,6 +54,5 @@ "LogLevel": { "Default": "Information" } - }, - "InstallationId": "c6f298a3-7a64-419e-89ca-4d73946a53fe" + } } From 420182b9bf3fff4e2aee9fdcf48ff5be6d5e4fce Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 18 Nov 2024 15:03:48 -0500 Subject: [PATCH 20/74] fix 2 factor authentication email --- Oqtane.Server/Managers/UserManager.cs | 2 -- Oqtane.Server/Resources/Managers/UserManager.resx | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Oqtane.Server/Managers/UserManager.cs b/Oqtane.Server/Managers/UserManager.cs index 03bff1bb..9fbc96d7 100644 --- a/Oqtane.Server/Managers/UserManager.cs +++ b/Oqtane.Server/Managers/UserManager.cs @@ -346,13 +346,11 @@ namespace Oqtane.Managers user.TwoFactorExpiry = DateTime.UtcNow.AddMinutes(10); _users.UpdateUser(user); var alias = _tenantManager.GetAlias(); - string url = alias.Protocol + alias.Name; string siteName = _sites.GetSite(alias.SiteId).Name; string subject = _localizer["TwoFactorEmailSubject"]; subject = subject.Replace("[SiteName]", siteName); string body = _localizer["TwoFactorEmailBody"].Value; body = body.Replace("[UserDisplayName]", user.DisplayName); - body = body.Replace("[URL]", url); body = body.Replace("[SiteName]", siteName); body = body.Replace("[Token]", token); var notification = new Notification(alias.SiteId, user, subject, body); diff --git a/Oqtane.Server/Resources/Managers/UserManager.resx b/Oqtane.Server/Resources/Managers/UserManager.resx index 66eec09c..ecc38fb0 100644 --- a/Oqtane.Server/Resources/Managers/UserManager.resx +++ b/Oqtane.Server/Resources/Managers/UserManager.resx @@ -1,4 +1,4 @@ - + Exe - 6.0.0 + 6.0.1 Oqtane Shaun Walker .NET Foundation @@ -14,7 +14,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 https://github.com/oqtane/oqtane.framework Git Oqtane.Maui @@ -30,7 +30,7 @@ com.oqtane.maui - 6.0.0 + 6.0.1 1 diff --git a/Oqtane.Package/Oqtane.Client.nuspec b/Oqtane.Package/Oqtane.Client.nuspec index bf169776..3620b920 100644 --- a/Oqtane.Package/Oqtane.Client.nuspec +++ b/Oqtane.Package/Oqtane.Client.nuspec @@ -2,7 +2,7 @@ Oqtane.Client - 6.0.0 + 6.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -12,7 +12,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 readme.md icon.png oqtane diff --git a/Oqtane.Package/Oqtane.Framework.nuspec b/Oqtane.Package/Oqtane.Framework.nuspec index 80b1baaa..60049a32 100644 --- a/Oqtane.Package/Oqtane.Framework.nuspec +++ b/Oqtane.Package/Oqtane.Framework.nuspec @@ -2,7 +2,7 @@ Oqtane.Framework - 6.0.0 + 6.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -11,8 +11,8 @@ .NET Foundation false MIT - https://github.com/oqtane/oqtane.framework/releases/download/v6.0.0/Oqtane.Framework.6.0.0.Upgrade.zip - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/download/v6.0.1/Oqtane.Framework.6.0.1.Upgrade.zip + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 readme.md icon.png oqtane framework diff --git a/Oqtane.Package/Oqtane.Server.nuspec b/Oqtane.Package/Oqtane.Server.nuspec index a053cf1f..42d74fe8 100644 --- a/Oqtane.Package/Oqtane.Server.nuspec +++ b/Oqtane.Package/Oqtane.Server.nuspec @@ -2,7 +2,7 @@ Oqtane.Server - 6.0.0 + 6.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -12,7 +12,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 readme.md icon.png oqtane diff --git a/Oqtane.Package/Oqtane.Shared.nuspec b/Oqtane.Package/Oqtane.Shared.nuspec index 019a6a18..885247ad 100644 --- a/Oqtane.Package/Oqtane.Shared.nuspec +++ b/Oqtane.Package/Oqtane.Shared.nuspec @@ -2,7 +2,7 @@ Oqtane.Shared - 6.0.0 + 6.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -12,7 +12,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 readme.md icon.png oqtane diff --git a/Oqtane.Package/Oqtane.Updater.nuspec b/Oqtane.Package/Oqtane.Updater.nuspec index f7a18303..89768e12 100644 --- a/Oqtane.Package/Oqtane.Updater.nuspec +++ b/Oqtane.Package/Oqtane.Updater.nuspec @@ -2,7 +2,7 @@ Oqtane.Updater - 6.0.0 + 6.0.1 Shaun Walker .NET Foundation Oqtane Framework @@ -12,7 +12,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 readme.md icon.png oqtane diff --git a/Oqtane.Package/install.ps1 b/Oqtane.Package/install.ps1 index 9f4ef87b..dee9ddf2 100644 --- a/Oqtane.Package/install.ps1 +++ b/Oqtane.Package/install.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.0.0.Install.zip" -Force +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.0.1.Install.zip" -Force diff --git a/Oqtane.Package/upgrade.ps1 b/Oqtane.Package/upgrade.ps1 index 7ece0bea..5e734637 100644 --- a/Oqtane.Package/upgrade.ps1 +++ b/Oqtane.Package/upgrade.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.0.0.Upgrade.zip" -Force +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.0.1.Upgrade.zip" -Force diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 993d40e2..a779f8d9 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -3,7 +3,7 @@ net9.0 Debug;Release - 6.0.0 + 6.0.1 Oqtane Shaun Walker .NET Foundation @@ -11,7 +11,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 https://github.com/oqtane/oqtane.framework Git Oqtane diff --git a/Oqtane.Shared/Oqtane.Shared.csproj b/Oqtane.Shared/Oqtane.Shared.csproj index c3854210..e5209a21 100644 --- a/Oqtane.Shared/Oqtane.Shared.csproj +++ b/Oqtane.Shared/Oqtane.Shared.csproj @@ -3,7 +3,7 @@ net9.0 Debug;Release - 6.0.0 + 6.0.1 Oqtane Shaun Walker .NET Foundation @@ -11,7 +11,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 https://github.com/oqtane/oqtane.framework Git Oqtane diff --git a/Oqtane.Updater/Oqtane.Updater.csproj b/Oqtane.Updater/Oqtane.Updater.csproj index 8f111c0b..24dd1348 100644 --- a/Oqtane.Updater/Oqtane.Updater.csproj +++ b/Oqtane.Updater/Oqtane.Updater.csproj @@ -3,7 +3,7 @@ net9.0 Exe - 6.0.0 + 6.0.1 Oqtane Shaun Walker .NET Foundation @@ -11,7 +11,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0 + https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.1 https://github.com/oqtane/oqtane.framework Git Oqtane From 6d3092f4409d5d78b845175c8710913e8059a654 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Fri, 22 Nov 2024 16:34:35 -0500 Subject: [PATCH 27/74] fix #4760 - display update confirmation message in Site Settings --- Oqtane.Client/Modules/Admin/Site/Index.razor | 179 ++++++++++--------- 1 file changed, 92 insertions(+), 87 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Site/Index.razor b/Oqtane.Client/Modules/Admin/Site/Index.razor index ff94804a..1db3bc96 100644 --- a/Oqtane.Client/Modules/Admin/Site/Index.razor +++ b/Oqtane.Client/Modules/Admin/Site/Index.razor @@ -32,32 +32,32 @@ @foreach (Page page in _pages) { - if (UserSecurity.ContainsRole(page.PermissionList, PermissionNames.View, RoleNames.Everyone)) - { - - } + if (UserSecurity.ContainsRole(page.PermissionList, PermissionNames.View, RoleNames.Everyone)) + { + + } }
-
- -
- -
-
-
- -
+
+ +
+ +
+
+
+ + -
+
@@ -159,8 +159,8 @@
-
-
+
+
@@ -213,10 +213,10 @@
-
- +
+ -
+
@@ -225,15 +225,15 @@
-
- -
- -
-
+
+ +
+ +
+
@@ -244,10 +244,10 @@
- -
+ +
-
+


@@ -280,57 +280,57 @@
@if (_aliases != null && UserSecurity.IsAuthorized(PageState.User, RoleNames.Host)) { -
-
-
- -
- - -
-   -   - @Localizer["AliasName"] - @Localizer["AliasDefault"] -
- - @if (context.AliasId != _aliasid) - { - - @if (_aliasid == -1) - { - - } - - - @if (_aliasid == -1) - { - - } - - @context.Name +
+
+
+ +
+ + +
+   +   + @Localizer["AliasName"] + @Localizer["AliasDefault"] +
+ + @if (context.AliasId != _aliasid) + { + + @if (_aliasid == -1) + { + + } + + + @if (_aliasid == -1) + { + + } + + @context.Name @((context.IsDefault) ? SharedLocalizer["Yes"] : SharedLocalizer["No"]) - } - else - { - - - - - - - - - } - -
-
-
-
-
+ } + else + { + + + + + + + + + } +
+
+
+
+
+
@@ -376,7 +376,7 @@
- +
@@ -390,7 +390,7 @@
- +
@@ -481,6 +481,11 @@ { try { + if (PageState.QueryString.ContainsKey("updated")) + { + AddModuleMessage(Localizer["Success.Settings.SaveSite"], MessageType.Success); + } + Site site = await SiteService.GetSiteAsync(PageState.Site.SiteId); if (site != null) { @@ -736,7 +741,7 @@ await logger.LogInformation("Site Settings Saved {Site}", site); - NavigationManager.NavigateTo(NavigateUrl(), true); // reload + NavigationManager.NavigateTo(NavigateUrl(PageState.Page.Path, "updated=true"), true); // reload } } else From b5f75f0c5ec97a2417eaaab58d707369c7717ed7 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 23 Nov 2024 13:04:27 +0800 Subject: [PATCH 28/74] Fix #4841: force 2FA validation when it's required in site level. --- Oqtane.Server/Controllers/UserController.cs | 2 +- Oqtane.Server/Managers/UserManager.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Oqtane.Server/Controllers/UserController.cs b/Oqtane.Server/Controllers/UserController.cs index acbcb1a1..283ccf91 100644 --- a/Oqtane.Server/Controllers/UserController.cs +++ b/Oqtane.Server/Controllers/UserController.cs @@ -136,7 +136,7 @@ namespace Oqtane.Controllers filtered.PhotoFileId = user.PhotoFileId; filtered.LastLoginOn = user.LastLoginOn; filtered.LastIPAddress = user.LastIPAddress; - filtered.TwoFactorRequired = false; + filtered.TwoFactorRequired = user.TwoFactorRequired; filtered.Roles = user.Roles; filtered.CreatedBy = user.CreatedBy; filtered.CreatedOn = user.CreatedOn; diff --git a/Oqtane.Server/Managers/UserManager.cs b/Oqtane.Server/Managers/UserManager.cs index 9fbc96d7..5b68eeb2 100644 --- a/Oqtane.Server/Managers/UserManager.cs +++ b/Oqtane.Server/Managers/UserManager.cs @@ -339,13 +339,15 @@ namespace Oqtane.Managers user = _users.GetUser(user.Username); if (!user.IsDeleted) { - if (user.TwoFactorRequired) + var alias = _tenantManager.GetAlias(); + var twoFactorSetting = _settings.GetSetting(EntityNames.Site, alias.SiteId, "LoginOptions:TwoFactor")?.SettingValue ?? "false"; + var twoFactorRequired = twoFactorSetting == "required" || user.TwoFactorRequired; + if (twoFactorRequired) { var token = await _identityUserManager.GenerateTwoFactorTokenAsync(identityuser, "Email"); user.TwoFactorCode = token; user.TwoFactorExpiry = DateTime.UtcNow.AddMinutes(10); _users.UpdateUser(user); - var alias = _tenantManager.GetAlias(); string siteName = _sites.GetSite(alias.SiteId).Name; string subject = _localizer["TwoFactorEmailSubject"]; subject = subject.Replace("[SiteName]", siteName); From 1578f82efb6430e583160a1ea8312b38ee8f76eb Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Sat, 23 Nov 2024 11:42:22 +0100 Subject: [PATCH 29/74] Updated the Module Settings to use the new ActiveTab parameter --- .../Modules/Admin/Modules/Settings.razor | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Modules/Settings.razor b/Oqtane.Client/Modules/Admin/Modules/Settings.razor index d2ab823e..a949271f 100644 --- a/Oqtane.Client/Modules/Admin/Modules/Settings.razor +++ b/Oqtane.Client/Modules/Admin/Modules/Settings.razor @@ -12,7 +12,7 @@ @if (_initialized) { - + @if (_containers != null) { @@ -162,6 +162,7 @@ private DateTime? _effectivedate = null; private DateTime? _expirydate = null; private List _pages; + private string _activetab = ""; protected override async Task OnInitializedAsync() { @@ -241,6 +242,7 @@ private async Task SaveModule() { + validated = true; var interop = new Interop(JSRuntime); if (await interop.FormValid(form)) @@ -261,21 +263,21 @@ pagemodule.ExpiryDate = Utilities.LocalDateAndTimeAsUtc(_expirydate); pagemodule.ContainerType = (_containerType != "-") ? _containerType : string.Empty; if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Page.DefaultContainerType) - { - pagemodule.ContainerType = string.Empty; - } - if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Site.DefaultContainerType) - { - pagemodule.ContainerType = string.Empty; - } - await PageModuleService.UpdatePageModuleAsync(pagemodule); - await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane); + { + pagemodule.ContainerType = string.Empty; + } + if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Site.DefaultContainerType) + { + pagemodule.ContainerType = string.Empty; + } + await PageModuleService.UpdatePageModuleAsync(pagemodule); + await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane); - var module = ModuleState; - module.AllPages = bool.Parse(_allPages); - module.PageModuleId = ModuleState.PageModuleId; - module.PermissionList = _permissionGrid.GetPermissionList(); - await ModuleService.UpdateModuleAsync(module); + var module = ModuleState; + module.AllPages = bool.Parse(_allPages); + module.PageModuleId = ModuleState.PageModuleId; + module.PermissionList = _permissionGrid.GetPermissionList(); + await ModuleService.UpdateModuleAsync(module); if (_moduleSettingsType != null) { @@ -300,11 +302,13 @@ } else { + _activetab = "Settings"; AddModuleMessage(Localizer["Message.Required.Title"], MessageType.Warning); } } else { + _activetab = "Settings"; AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning); } } From ff84b50817b1322562fbc47832eefc90b8bb5819 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Mon, 25 Nov 2024 09:09:13 -0500 Subject: [PATCH 30/74] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4b1adde8..b564eef2 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ +# Oqtane Framework + +![Oqtane](https://github.com/oqtane/framework/blob/master/oqtane.png?raw=true "Oqtane") + +Oqtane is an open source Content Management System (CMS) and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on modern .NET. + +Oqtane allows you to "Build Applications, Not Infrastructure" which means that you can focus your investment on solving your unique business challenges rather than wasting time and effort on building out general infrastructure. Oqtane is "Rocket Fuel for Blazor" as it provides powerful capabilities to accelerate your Blazor development experience, providing scalable services and a composable UI which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). + +Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). This project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** + # Latest Release [6.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v6.0.0) was released on November 14, 2024 and is a major release including 39 pull requests by 6 different contributors, pushing the total number of project commits all-time to over 6000. 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) -# Oqtane Framework - -![Oqtane](https://github.com/oqtane/framework/blob/master/oqtane.png?raw=true "Oqtane") - -Oqtane is an open source CMS and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on .NET. It leverages Blazor to compose a fully dynamic digital experience which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). - -Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). - -Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** - # Getting Started (Version 6.x) **Installing using source code from the Dev/Master branch:** From a3d25f91c8e68d3877cdfc3776ec4ed26e63eedd Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Mon, 25 Nov 2024 09:09:52 -0500 Subject: [PATCH 31/74] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b564eef2..94ded2f1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ Oqtane is an open source Content Management System (CMS) and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on modern .NET. -Oqtane allows you to "Build Applications, Not Infrastructure" which means that you can focus your investment on solving your unique business challenges rather than wasting time and effort on building out general infrastructure. Oqtane is "Rocket Fuel for Blazor" as it provides powerful capabilities to accelerate your Blazor development experience, providing scalable services and a composable UI which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). +Oqtane allows you to "Build Applications, Not Infrastructure" which means that you can focus your investment on solving your unique business challenges rather than wasting time and effort on building out general infrastructure. + +Oqtane is "Rocket Fuel for Blazor" as it provides powerful capabilities to accelerate your Blazor development experience, providing scalable services and a composable UI which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). This project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** From 2f1691bfb0d0162039fc450beeaac9cf01de241b Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Mon, 25 Nov 2024 09:10:20 -0500 Subject: [PATCH 32/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94ded2f1..6518748e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Oqtane allows you to "Build Applications, Not Infrastructure" which means that y Oqtane is "Rocket Fuel for Blazor" as it provides powerful capabilities to accelerate your Blazor development experience, providing scalable services and a composable UI which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). -Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). This project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** +Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). This project is an official member of the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** # Latest Release From ae8d6006001250fe6219b22674428b5a3070a9f1 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Mon, 25 Nov 2024 09:11:12 -0500 Subject: [PATCH 33/74] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6518748e..3280b496 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Oqtane is an open source Content Management System (CMS) and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on modern .NET. -Oqtane allows you to "Build Applications, Not Infrastructure" which means that you can focus your investment on solving your unique business challenges rather than wasting time and effort on building out general infrastructure. +Oqtane allows you to "Build Applications, Not Infrastructure" which means that you can focus your investment on solving your unique business challenges rather than wasting time and effort on building general infrastructure. Oqtane is "Rocket Fuel for Blazor" as it provides powerful capabilities to accelerate your Blazor development experience, providing scalable services and a composable UI which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI). From 737740a3ca452cb80f0039af1f51119014801397 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 25 Nov 2024 13:48:28 -0500 Subject: [PATCH 34/74] improve message grammar --- Oqtane.Client/Resources/Modules/Admin/Upgrade/Index.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Upgrade/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Upgrade/Index.resx index e9a376e1..a833fa20 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Upgrade/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Upgrade/Index.resx @@ -1,4 +1,4 @@ - +