diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index a3969946..eb4ab1a8 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -15,7 +15,7 @@
-
@SharedLocalizer["Version"] @Constants.Version (.NET 7)
+
@SharedLocalizer["Version"] @Constants.Version (.NET 8)

diff --git a/Oqtane.Client/Modules/Admin/Login/Index.razor b/Oqtane.Client/Modules/Admin/Login/Index.razor index 5633a504..476c93ef 100644 --- a/Oqtane.Client/Modules/Admin/Login/Index.razor +++ b/Oqtane.Client/Modules/Admin/Login/Index.razor @@ -93,23 +93,16 @@ { try { + _allowexternallogin = (SettingService.GetSetting(PageState.Site.Settings, "ExternalLogin:ProviderType", "") != "") ? true : false; + _allowsitelogin = bool.Parse(SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:AllowSiteLogin", "true")); + + _togglepassword = SharedLocalizer["ShowPassword"]; + if (PageState.QueryString.ContainsKey("returnurl")) { _returnUrl = PageState.QueryString["returnurl"]; } - _allowexternallogin = (SettingService.GetSetting(PageState.Site.Settings, "ExternalLogin:ProviderType", "") != "") ? true : false; - _allowsitelogin = bool.Parse(SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:AllowSiteLogin", "true")); - - if (_allowexternallogin && !_allowsitelogin) - { - // redirect to external login - NavigationManager.NavigateTo(Utilities.TenantUrl(PageState.Alias, "/pages/external?returnurl=" + _returnUrl), true); - return; - } - - _togglepassword = SharedLocalizer["ShowPassword"]; - if (PageState.QueryString.ContainsKey("name")) { _username = PageState.QueryString["name"]; diff --git a/Oqtane.Client/Modules/Admin/Profiles/Edit.razor b/Oqtane.Client/Modules/Admin/Profiles/Edit.razor index 33ec94b0..91fe98ec 100644 --- a/Oqtane.Client/Modules/Admin/Profiles/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Profiles/Edit.razor @@ -22,7 +22,7 @@
- +
@@ -34,25 +34,25 @@
- +
- +
- +
- +
diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Add.razor b/Oqtane.Client/Modules/Admin/UserProfile/Add.razor index ceeb2713..fca4ddc9 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Add.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Add.razor @@ -2,6 +2,7 @@ @inherits ModuleBase @inject NavigationManager NavigationManager @inject IUserService UserService +@inject IUserRoleService UserRoleService @inject INotificationService NotificationService @inject IStringLocalizer Localizer @inject IStringLocalizer SharedLocalizer @@ -10,10 +11,10 @@ {
- +
- -
+ +
@@ -30,11 +31,11 @@

- @SharedLocalizer["Cancel"] + @SharedLocalizer["Cancel"] } @code { - private string username = ""; + private AutoComplete username; private string subject = ""; private string body = ""; @@ -42,21 +43,35 @@ public override string Title => "Send Notification"; + private async Task> GetUsers(string filter) + { + var users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered); + return users.Where(item => item.User.Username.Contains(filter, StringComparison.OrdinalIgnoreCase)) + .ToDictionary(item => item.UserId.ToString(), item => item.User.Username); + } + private async Task Send() { try { - var user = await UserService.GetUserAsync(username, PageState.Site.SiteId); - if (user != null) + if (!string.IsNullOrEmpty(username.Key) && !string.IsNullOrEmpty(subject)) { - var notification = new Notification(PageState.Site.SiteId, PageState.User, user, subject, body); - notification = await NotificationService.AddNotificationAsync(notification); - await logger.LogInformation("Notification Created {NotificationId}", notification.NotificationId); - NavigationManager.NavigateTo(NavigateUrl()); + var user = await UserService.GetUserAsync(int.Parse(username.Key), ModuleState.SiteId); + if (user != null) + { + var notification = new Notification(PageState.Site.SiteId, PageState.User, user, subject, body); + notification = await NotificationService.AddNotificationAsync(notification); + await logger.LogInformation("Notification Created {NotificationId}", notification.NotificationId); + NavigationManager.NavigateTo(PageState.ReturnUrl); + } + else + { + AddModuleMessage(Localizer["Message.User.Invalid"], MessageType.Warning); + } } else { - AddModuleMessage(Localizer["Message.User.Invalid"], MessageType.Warning); + AddModuleMessage(Localizer["Message.Required"], MessageType.Warning); } } catch (Exception ex) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index 694f28aa..58cc901e 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -11,18 +11,18 @@ @inject IStringLocalizer Localizer @inject IStringLocalizer SharedLocalizer -@if (PageState.User != null && photo != null) +@if (_initialized) { - @displayname -} -else -{ -
-} - - - @if (profiles != null && settings != null) - { + @if (PageState.User != null && photo != null) + { + @displayname + } + else + { +
+ } + +
@@ -33,34 +33,34 @@ else
-
+
- + -
+
- + -
+
- @if (allowtwofactor) - { -
- -
- -
-
- } + @if (allowtwofactor) + { +
+ +
+ +
+
+ }
@@ -83,11 +83,8 @@ else
- } - - - @if (profiles != null && settings != null) - { + +
@foreach (Profile profile in profiles) @@ -104,8 +101,8 @@ else }
-
- @if (!string.IsNullOrEmpty(p.Options)) +
+ @if (!string.IsNullOrEmpty(p.Options)) {
- -

@if (filter == "to") { - -
+ @if (notifications.Any()) + { + +
    @Localizer["From"] @Localizer["Subject"] @Localizer["Received"] -
- - - - - @if (context.IsRead) - { - @context.FromDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - else - { - @context.FromDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - - - - - @{ - string input = "___"; - if (context.Body.Contains(input)) - { - context.Body = context.Body.Split(input)[0]; - context.Body = context.Body.Replace("\n", ""); - context.Body = context.Body.Replace("\r", ""); - } - notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; - } +
+ + + + @if (context.IsRead) { - @notificationSummary + @context.FromDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } else { - @notificationSummary + @context.FromDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } - - -
+ + + + + @{ + string input = "___"; + if (context.Body.Contains(input)) + { + context.Body = context.Body.Split(input)[0]; + context.Body = context.Body.Replace("\n", ""); + context.Body = context.Body.Replace("\r", ""); + } + notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; + } + @if (context.IsRead) + { + @notificationSummary + } + else + { + @notificationSummary + } + + + +
+ + } + else + { +
+ @Localizer["NoNotificationsReceived.Text"] +
+ } } else { - -
-   -   + @if (notifications.Any()) + { + +
+ + @Localizer["To"] @Localizer["Subject"] @Localizer["Sent"] -
- - - +
+ + + - @if (context.IsRead) - { - @context.ToDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - else - { - @context.ToDisplayName - @context.Subject - @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) - } - - - - - - @{ - string input = "___"; - if (context.Body.Contains(input)) - { - context.Body = context.Body.Split(input)[0]; - context.Body = context.Body.Replace("\n", ""); - context.Body = context.Body.Replace("\r", ""); - } - notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; - } @if (context.IsRead) { - @notificationSummary + @context.ToDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) } - else + else { - @notificationSummary - } - - -
+ @context.ToDisplayName + @context.Subject + @string.Format("{0:dd-MMM-yyyy HH:mm:ss}", @context.CreatedOn) + } + + + + + + @{ + string input = "___"; + if (context.Body.Contains(input)) + { + context.Body = context.Body.Split(input)[0]; + context.Body = context.Body.Replace("\n", ""); + context.Body = context.Body.Replace("\r", ""); + } + notificationSummary = context.Body.Length > 100 ? (context.Body.Substring(0, 97) + "...") : context.Body; + } + @if (context.IsRead) + { + @notificationSummary + } + else + { + @notificationSummary + } + + + +
+ + } + else + { +
+ @Localizer["NoNotificationsSent.Text"] +
+ } } - @if (notifications.Any()) - { -
- - } - } - - -

+ + +
+
+} @code { + private bool _initialized = false; private string _passwordrequirements; private string username = string.Empty; private string _password = string.Empty; @@ -307,15 +321,14 @@ else public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View; - protected override async Task OnParametersSetAsync() + protected override async Task OnInitializedAsync() { try { _passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId); - _togglepassword = SharedLocalizer["ShowPassword"]; - allowtwofactor = (SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:TwoFactor", "false") == "true"); + profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId); if (PageState.User != null) { @@ -342,10 +355,11 @@ else photo = null; } - profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId); settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId); await LoadNotificationsAsync(); + + _initialized = true; } else { @@ -445,13 +459,14 @@ else { foreach (Profile profile in profiles) { - if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue)) + var value = GetProfileValue(profile.Name, string.Empty); + if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(profile.DefaultValue)) { settings = SettingService.SetSetting(settings, profile.Name, profile.DefaultValue); } if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin)) { - if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty))) + if (profile.IsRequired && string.IsNullOrEmpty(value)) { AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning); return false; @@ -459,7 +474,7 @@ else if (!string.IsNullOrEmpty(profile.Validation)) { Regex regex = new Regex(profile.Validation); - bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success; + bool valid = regex.Match(value).Success; if (!valid) { AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning); @@ -510,7 +525,6 @@ else private async void FilterChanged(ChangeEventArgs e) { filter = (string)e.Value; - await LoadNotificationsAsync(); StateHasChanged(); } diff --git a/Oqtane.Client/Modules/Admin/UserProfile/View.razor b/Oqtane.Client/Modules/Admin/UserProfile/View.razor index 905c94ef..3f104710 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/View.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/View.razor @@ -8,94 +8,71 @@ @if (PageState.User != null) { -
-
- - @if (title == "From") - { -
- -
- } - @if (title == "To") - { -
- -
- } -
-
- - @if (title == "From") - { -
- -
- } - @if (title == "To") - { -
- -
- } -
-
-
- @if (title == "From") - { + @if (title == "From") + { +
- +
- +
- } - @if (title == "From") - { -
- -
- - } - else - { - - } + } }
@@ -126,15 +112,17 @@ }
- } - - -
-
- -@SharedLocalizer["Cancel"] + + +
+
+ + @SharedLocalizer["Cancel"] +} + @code { + private bool _initialized = false; private string _passwordrequirements; private string _username = string.Empty; private string _password = string.Empty; @@ -158,6 +146,7 @@ _togglepassword = SharedLocalizer["ShowPassword"]; profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId); settings = new Dictionary(); + _initialized = true; } catch (Exception ex) { @@ -231,13 +220,14 @@ { foreach (Profile profile in profiles) { - if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue)) + var value = GetProfileValue(profile.Name, string.Empty); + if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(profile.DefaultValue)) { settings = SettingService.SetSetting(settings, profile.Name, profile.DefaultValue); } if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin)) { - if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty))) + if (profile.IsRequired && string.IsNullOrEmpty(value)) { AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning); return false; @@ -245,7 +235,7 @@ if (!string.IsNullOrEmpty(profile.Validation)) { Regex regex = new Regex(profile.Validation); - bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success; + bool valid = regex.Match(value).Success; if (!valid) { AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning); diff --git a/Oqtane.Client/Modules/Admin/Users/Edit.razor b/Oqtane.Client/Modules/Admin/Users/Edit.razor index ea0198c9..8d43a4d6 100644 --- a/Oqtane.Client/Modules/Admin/Users/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Users/Edit.razor @@ -9,18 +9,10 @@ @inject IStringLocalizer Localizer @inject IStringLocalizer SharedLocalizer -@if (PageState.User != null && photo != null) +@if (_initialized) { - @displayname -} -else -{ -
-} - - - @if (profiles != null) - { + +
@@ -31,20 +23,20 @@ else
-
+
- + -
+
- + -
+
@@ -87,11 +79,8 @@ else
- } - - - @if (profiles != null) - { + +
@foreach (Profile profile in profiles) @@ -106,8 +95,8 @@ else }
-
- @if (!string.IsNullOrEmpty(p.Options)) +
+ @if (!string.IsNullOrEmpty(p.Options)) { - } - else - { - - } + } else { - @if (p.IsRequired) - { - - } - else - { - - } + } }
@@ -153,17 +128,18 @@ else }
- } - - + + - -@SharedLocalizer["Cancel"] -
-
- + + @SharedLocalizer["Cancel"] +
+
+ +} -@code { + @code { + private bool _initialized = false; private string _passwordrequirements; private int userid; private string username = string.Empty; @@ -175,7 +151,6 @@ else private string displayname = string.Empty; private FileManager filemanager; private int photofileid = -1; - private File photo = null; private string isdeleted; private string lastlogin; private string lastipaddress; @@ -193,16 +168,17 @@ else public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit; - protected override async Task OnParametersSetAsync() + protected override async Task OnInitializedAsync() { try { - if (PageState.QueryString.ContainsKey("id")) + _passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId); + _togglepassword = SharedLocalizer["ShowPassword"]; + profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId); + + if (PageState.QueryString.ContainsKey("id") && int.TryParse(PageState.QueryString["id"], out int UserId)) { - _passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId); - _togglepassword = SharedLocalizer["ShowPassword"]; - profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId); - userid = Int32.Parse(PageState.QueryString["id"]); + userid = UserId; var user = await UserService.GetUserAsync(userid, PageState.Site.SiteId); if (user != null) { @@ -212,12 +188,10 @@ else if (user.PhotoFileId != null) { photofileid = user.PhotoFileId.Value; - photo = await FileService.GetFileAsync(photofileid); } else { photofileid = -1; - photo = null; } isdeleted = user.IsDeleted.ToString(); lastlogin = string.Format("{0:MMM dd yyyy HH:mm:ss}", user.LastLoginOn); @@ -232,6 +206,8 @@ else deletedon = user.DeletedOn; } } + + _initialized = true; } catch (Exception ex) { @@ -309,13 +285,14 @@ else { foreach (Profile profile in profiles) { - if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue)) + var value = GetProfileValue(profile.Name, string.Empty); + if (string.IsNullOrEmpty(value) && !string.IsNullOrEmpty(profile.DefaultValue)) { settings = SettingService.SetSetting(settings, profile.Name, profile.DefaultValue); } if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin)) { - if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty))) + if (profile.IsRequired && string.IsNullOrEmpty(value)) { AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning); return false; @@ -323,7 +300,7 @@ else if (!string.IsNullOrEmpty(profile.Validation)) { Regex regex = new Regex(profile.Validation); - bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success; + bool valid = regex.Match(value).Success; if (!valid) { AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning); diff --git a/Oqtane.Client/Modules/Admin/Users/Index.razor b/Oqtane.Client/Modules/Admin/Users/Index.razor index 4cd17e00..c7968ee3 100644 --- a/Oqtane.Client/Modules/Admin/Users/Index.razor +++ b/Oqtane.Client/Modules/Admin/Users/Index.razor @@ -323,7 +323,16 @@ else
- } +
+ +
+ +
+
+ }
@@ -410,6 +419,7 @@ else private string _profileclaimtypes; private string _domainfilter; private string _createusers; + private string _verifyusers; private string _secret; private string _secrettype = "password"; @@ -468,6 +478,7 @@ else _profileclaimtypes = SettingService.GetSetting(settings, "ExternalLogin:ProfileClaimTypes", ""); _domainfilter = SettingService.GetSetting(settings, "ExternalLogin:DomainFilter", ""); _createusers = SettingService.GetSetting(settings, "ExternalLogin:CreateUsers", "true"); + _verifyusers = SettingService.GetSetting(settings, "ExternalLogin:VerifyUsers", "true"); _secret = SettingService.GetSetting(settings, "JwtOptions:Secret", ""); _togglesecret = SharedLocalizer["ShowPassword"]; @@ -556,6 +567,7 @@ else settings = SettingService.SetSetting(settings, "ExternalLogin:ProfileClaimTypes", _profileclaimtypes, true); settings = SettingService.SetSetting(settings, "ExternalLogin:DomainFilter", _domainfilter, true); settings = SettingService.SetSetting(settings, "ExternalLogin:CreateUsers", _createusers, true); + settings = SettingService.SetSetting(settings, "ExternalLogin:VerifyUsers", _verifyusers, true); if (!string.IsNullOrEmpty(_secret) && _secret.Length < 16) _secret = (_secret + "????????????????").Substring(0, 16); settings = SettingService.SetSetting(settings, "JwtOptions:Secret", _secret, true); diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj index 26fd8912..11cb3ebe 100644 --- a/Oqtane.Client/Oqtane.Client.csproj +++ b/Oqtane.Client/Oqtane.Client.csproj @@ -1,10 +1,10 @@ - net7.0 + net8.0 Exe Debug;Release - 4.0.6 + 5.0.0 Oqtane Shaun Walker .NET Foundation @@ -12,7 +12,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git Oqtane @@ -21,12 +21,12 @@ - - - - - - + + + + + + diff --git a/Oqtane.Client/Resources/Modules/Admin/Profiles/Edit.resx b/Oqtane.Client/Resources/Modules/Admin/Profiles/Edit.resx index 8a3a23ca..973f8719 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Profiles/Edit.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Profiles/Edit.resx @@ -187,6 +187,12 @@ Optionally provide a regular expression (RegExp) for validating the value entered - Validation: + Validation: - \ No newline at end of file + + The number of rows for text entry (one is the default) + + + Rows: + + diff --git a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Add.resx b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Add.resx index e8c57007..4f287b18 100644 --- a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Add.resx +++ b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Add.resx @@ -121,7 +121,7 @@ Message: - User Does Not Exist. Please Verify That The Username Provided Is Correct. + The User Specified Does Not Exist Error Adding Notification @@ -133,7 +133,7 @@ Enter the subject of the message - Enter the message + Enter the message content To: @@ -144,4 +144,10 @@ Send Notification + + You Must Enter All Required Information + + + Enter Username + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx index 7021f4a8..8bcffb8c 100644 --- a/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/UserProfile/Index.resx @@ -233,5 +233,11 @@ Delete - + + + No notifications have been received + + + No notifications have been sent + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/UserProfile/View.resx b/Oqtane.Client/Resources/Modules/Admin/UserProfile/View.resx index 601caf6d..07e894f3 100644 --- a/Oqtane.Client/Resources/Modules/Admin/UserProfile/View.resx +++ b/Oqtane.Client/Resources/Modules/Admin/UserProfile/View.resx @@ -126,25 +126,43 @@ Error Adding Notification - - Title: - - - Subject: - - - Date: - - - Message: - - - Reply - - - Original Message - View Notification + + The date the message was sent + + + Sent: + + + The user who sent the message + + + From: + + + The content of the message + + + Message: + + + RE: + + + The subject of the message + + + Subject: + + + System + + + The user who will be the recipient of the message + + + To: + \ No newline at end of file diff --git a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx index fb932e57..1c5af3be 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx @@ -435,4 +435,10 @@ Authorization Response Type + + Do you want existing users to perform an additional email verification step to link their external login? If you disable this option, existing users will be linked automatically. + + + Verify Existing Users? + \ No newline at end of file diff --git a/Oqtane.Client/Themes/Controls/Theme/LoginBase.cs b/Oqtane.Client/Themes/Controls/Theme/LoginBase.cs index fd4310a9..b3de5229 100644 --- a/Oqtane.Client/Themes/Controls/Theme/LoginBase.cs +++ b/Oqtane.Client/Themes/Controls/Theme/LoginBase.cs @@ -23,8 +23,23 @@ namespace Oqtane.Themes.Controls protected void LoginUser() { + var allowexternallogin = (SettingService.GetSetting(PageState.Site.Settings, "ExternalLogin:ProviderType", "") != "") ? true : false; + var allowsitelogin = bool.Parse(SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:AllowSiteLogin", "true")); + Route route = new Route(PageState.Uri.AbsoluteUri, PageState.Alias.Path); - NavigationManager.NavigateTo(NavigateUrl("login", "?returnurl=" + WebUtility.UrlEncode(route.PathAndQuery))); + var returnurl = WebUtility.UrlEncode(route.PathAndQuery); + + if (allowexternallogin && !allowsitelogin) + { + // external login + NavigationManager.NavigateTo(Utilities.TenantUrl(PageState.Alias, "/pages/external?returnurl=" + returnurl), true); + } + else + { + // local login + NavigationManager.NavigateTo(NavigateUrl("login", "?returnurl=" + returnurl)); + } + } protected async Task LogoutUser() diff --git a/Oqtane.Database.MySQL/Oqtane.Database.MySQL.csproj b/Oqtane.Database.MySQL/Oqtane.Database.MySQL.csproj index e120b1e0..89038c82 100644 --- a/Oqtane.Database.MySQL/Oqtane.Database.MySQL.csproj +++ b/Oqtane.Database.MySQL/Oqtane.Database.MySQL.csproj @@ -1,8 +1,8 @@ - net7.0 - 4.0.6 + net8.0 + 5.0.0 Oqtane Shaun Walker .NET Foundation @@ -10,7 +10,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git true @@ -29,7 +29,7 @@ - + diff --git a/Oqtane.Database.MySQL/Oqtane.Database.MySQL.nuspec b/Oqtane.Database.MySQL/Oqtane.Database.MySQL.nuspec index 4f8ddae2..751038af 100644 --- a/Oqtane.Database.MySQL/Oqtane.Database.MySQL.nuspec +++ b/Oqtane.Database.MySQL/Oqtane.Database.MySQL.nuspec @@ -2,7 +2,7 @@ Oqtane.Database.MySQL - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane MySQL Provider @@ -12,15 +12,15 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - - - + + + + \ No newline at end of file diff --git a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj index 36d41ef5..eb9ee9d3 100644 --- a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj +++ b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj @@ -1,8 +1,8 @@ - net7.0 - 4.0.6 + net8.0 + 5.0.0 Oqtane Shaun Walker .NET Foundation @@ -10,7 +10,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git true @@ -30,8 +30,8 @@ - - + + diff --git a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.nuspec b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.nuspec index eb86fc9d..b43d0d97 100644 --- a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.nuspec +++ b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.nuspec @@ -2,7 +2,7 @@ Oqtane.Database.PostgreSQL - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane PostgreSQL Provider @@ -12,16 +12,16 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - - - - + + + + + \ No newline at end of file diff --git a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj index 0f0c5e1a..599e995d 100644 --- a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj +++ b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj @@ -1,8 +1,8 @@ - net7.0 - 4.0.6 + net8.0 + 5.0.0 Oqtane Shaun Walker .NET Foundation @@ -10,7 +10,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git true @@ -29,7 +29,7 @@ - + diff --git a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.nuspec b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.nuspec index f44a9cd5..9aed5043 100644 --- a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.nuspec +++ b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.nuspec @@ -2,7 +2,7 @@ Oqtane.Database.SqlServer - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane SQL Server Provider @@ -12,14 +12,14 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - - + + + \ No newline at end of file diff --git a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj index 5b21bbeb..8332867b 100644 --- a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj +++ b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj @@ -1,8 +1,8 @@ - net7.0 - 4.0.6 + net8.0 + 5.0.0 Oqtane Shaun Walker .NET Foundation @@ -10,7 +10,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git true @@ -29,7 +29,7 @@ - + diff --git a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.nuspec b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.nuspec index d6e9f51e..8dee352a 100644 --- a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.nuspec +++ b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.nuspec @@ -2,7 +2,7 @@ Oqtane.Database.Sqlite - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane SQLite Provider @@ -12,14 +12,14 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - - + + + \ No newline at end of file diff --git a/Oqtane.Maui/Oqtane.Maui.csproj b/Oqtane.Maui/Oqtane.Maui.csproj index dac49aa3..31a549b2 100644 --- a/Oqtane.Maui/Oqtane.Maui.csproj +++ b/Oqtane.Maui/Oqtane.Maui.csproj @@ -1,12 +1,12 @@ - $(TargetFrameworks);net7.0-windows10.0.19041.0 + $(TargetFrameworks);net8.0-windows10.0.19041.0 - - + + Exe - 4.0.6 + 5.0.0 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/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git Oqtane.Maui @@ -31,7 +31,7 @@ 0E29FC31-1B83-48ED-B6E0-9F3C67B775D4 - 4.0.6 + 5.0.0 1 14.2 @@ -65,20 +65,20 @@ - - + + - - - + + + - ..\Oqtane.Server\bin\Debug\net7.0\Oqtane.Client.dll + ..\Oqtane.Server\bin\Debug\net8.0\Oqtane.Client.dll - ..\Oqtane.Server\bin\Debug\net7.0\Oqtane.Shared.dll + ..\Oqtane.Server\bin\Debug\net8.0\Oqtane.Shared.dll diff --git a/Oqtane.Package/Oqtane.Client.nuspec b/Oqtane.Package/Oqtane.Client.nuspec index bdeaa36b..e6ef54f5 100644 --- a/Oqtane.Package/Oqtane.Client.nuspec +++ b/Oqtane.Package/Oqtane.Client.nuspec @@ -2,7 +2,7 @@ Oqtane.Client - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,13 +12,13 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - + + \ No newline at end of file diff --git a/Oqtane.Package/Oqtane.Framework.nuspec b/Oqtane.Package/Oqtane.Framework.nuspec index 9560c694..ac7b0882 100644 --- a/Oqtane.Package/Oqtane.Framework.nuspec +++ b/Oqtane.Package/Oqtane.Framework.nuspec @@ -2,7 +2,7 @@ Oqtane.Framework - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -11,8 +11,8 @@ .NET Foundation false MIT - https://github.com/oqtane/oqtane.framework/releases/download/v4.0.6/Oqtane.Framework.4.0.6.Upgrade.zip - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/download/v5.0.0Oqtane.Framework.5.0.0.Upgrade.zip + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane framework diff --git a/Oqtane.Package/Oqtane.Server.nuspec b/Oqtane.Package/Oqtane.Server.nuspec index e50d4c6b..e0575acd 100644 --- a/Oqtane.Package/Oqtane.Server.nuspec +++ b/Oqtane.Package/Oqtane.Server.nuspec @@ -2,7 +2,7 @@ Oqtane.Server - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,13 +12,13 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - + + \ No newline at end of file diff --git a/Oqtane.Package/Oqtane.Shared.nuspec b/Oqtane.Package/Oqtane.Shared.nuspec index 3de3d700..c07260b6 100644 --- a/Oqtane.Package/Oqtane.Shared.nuspec +++ b/Oqtane.Package/Oqtane.Shared.nuspec @@ -2,7 +2,7 @@ Oqtane.Shared - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,13 +12,13 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - - + + \ No newline at end of file diff --git a/Oqtane.Package/Oqtane.Updater.nuspec b/Oqtane.Package/Oqtane.Updater.nuspec index 57bd8ac0..dfd80f2a 100644 --- a/Oqtane.Package/Oqtane.Updater.nuspec +++ b/Oqtane.Package/Oqtane.Updater.nuspec @@ -2,7 +2,7 @@ Oqtane.Updater - 4.0.6 + 5.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,12 +12,12 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 icon.png oqtane - + \ No newline at end of file diff --git a/Oqtane.Package/install.ps1 b/Oqtane.Package/install.ps1 index 6449a533..ebb62c0e 100644 --- a/Oqtane.Package/install.ps1 +++ b/Oqtane.Package/install.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net7.0\publish\*" -DestinationPath "Oqtane.Framework.4.0.6.Install.zip" -Force \ No newline at end of file +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.0.Install.zip" -Force \ No newline at end of file diff --git a/Oqtane.Package/release.cmd b/Oqtane.Package/release.cmd index 299aa439..d22478d5 100644 --- a/Oqtane.Package/release.cmd +++ b/Oqtane.Package/release.cmd @@ -8,14 +8,14 @@ nuget.exe pack Oqtane.Client.nuspec nuget.exe pack Oqtane.Server.nuspec nuget.exe pack Oqtane.Shared.nuspec nuget.exe pack Oqtane.Framework.nuspec -del /F/Q/S "..\Oqtane.Server\bin\Release\net7.0\publish" > NUL -rmdir /Q/S "..\Oqtane.Server\bin\Release\net7.0\publish" +del /F/Q/S "..\Oqtane.Server\bin\Release\net8.0\publish" > NUL +rmdir /Q/S "..\Oqtane.Server\bin\Release\net8.0\publish" dotnet publish ..\Oqtane.Server\Oqtane.Server.csproj /p:Configuration=Release -del /F/Q/S "..\Oqtane.Server\bin\Release\net7.0\publish\wwwroot\Content" > NUL -rmdir /Q/S "..\Oqtane.Server\bin\Release\net7.0\publish\wwwroot\Content" +del /F/Q/S "..\Oqtane.Server\bin\Release\net8.0\publish\wwwroot\Content" > NUL +rmdir /Q/S "..\Oqtane.Server\bin\Release\net8.0\publish\wwwroot\Content" setlocal ENABLEDELAYEDEXPANSION set retain=Oqtane.Modules.Admin.Login,Oqtane.Modules.HtmlText -for /D %%i in ("..\Oqtane.Server\bin\Release\net7.0\publish\wwwroot\Modules\*") do ( +for /D %%i in ("..\Oqtane.Server\bin\Release\net8.0\publish\wwwroot\Modules\*") do ( set /A found=0 for %%j in (%retain%) do ( if "%%~nxi" == "%%j" set /A found=1 @@ -23,18 +23,18 @@ if "%%~nxi" == "%%j" set /A found=1 if not !found! == 1 rmdir /Q/S "%%i" ) set retain=Oqtane.Themes.BlazorTheme,Oqtane.Themes.OqtaneTheme -for /D %%i in ("..\Oqtane.Server\bin\Release\net7.0\publish\wwwroot\Themes\*") do ( +for /D %%i in ("..\Oqtane.Server\bin\Release\net8.0\publish\wwwroot\Themes\*") do ( set /A found=0 for %%j in (%retain%) do ( if "%%~nxi" == "%%j" set /A found=1 ) if not !found! == 1 rmdir /Q/S "%%i" ) -del "..\Oqtane.Server\bin\Release\net7.0\publish\appsettings.json" -ren "..\Oqtane.Server\bin\Release\net7.0\publish\appsettings.release.json" "appsettings.json" +del "..\Oqtane.Server\bin\Release\net8.0\publish\appsettings.json" +ren "..\Oqtane.Server\bin\Release\net8.0\publish\appsettings.release.json" "appsettings.json" C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\install.ps1" -del "..\Oqtane.Server\bin\Release\net7.0\publish\appsettings.json" -del "..\Oqtane.Server\bin\Release\net7.0\publish\web.config" +del "..\Oqtane.Server\bin\Release\net8.0\publish\appsettings.json" +del "..\Oqtane.Server\bin\Release\net8.0\publish\web.config" C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\upgrade.ps1" dotnet clean -c Release ..\Oqtane.Updater.sln dotnet build -c Release ..\Oqtane.Updater.sln diff --git a/Oqtane.Package/upgrade.ps1 b/Oqtane.Package/upgrade.ps1 index c2369c1c..f0c92eea 100644 --- a/Oqtane.Package/upgrade.ps1 +++ b/Oqtane.Package/upgrade.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net7.0\publish\*" -DestinationPath "Oqtane.Framework.4.0.6.Upgrade.zip" -Force \ No newline at end of file +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.0.Upgrade.zip" -Force \ No newline at end of file diff --git a/Oqtane.Server/Controllers/ModuleDefinitionController.cs b/Oqtane.Server/Controllers/ModuleDefinitionController.cs index 7afc125e..94c4c085 100644 --- a/Oqtane.Server/Controllers/ModuleDefinitionController.cs +++ b/Oqtane.Server/Controllers/ModuleDefinitionController.cs @@ -350,9 +350,9 @@ namespace Oqtane.Controllers if (moduleDefinition.Version == "local") { text = text.Replace("[FrameworkVersion]", Constants.Version); - text = text.Replace("[ClientReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net7.0\\Oqtane.Client.dll"); - text = text.Replace("[ServerReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net7.0\\Oqtane.Server.dll"); - text = text.Replace("[SharedReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net7.0\\Oqtane.Shared.dll"); + text = text.Replace("[ClientReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net8.0\\Oqtane.Client.dll"); + text = text.Replace("[ServerReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net8.0\\Oqtane.Server.dll"); + text = text.Replace("[SharedReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net8.0\\Oqtane.Shared.dll"); } else { diff --git a/Oqtane.Server/Controllers/NotificationController.cs b/Oqtane.Server/Controllers/NotificationController.cs index e2bfd14e..b5fc97d4 100644 --- a/Oqtane.Server/Controllers/NotificationController.cs +++ b/Oqtane.Server/Controllers/NotificationController.cs @@ -179,7 +179,7 @@ namespace Oqtane.Controllers [Authorize(Roles = RoleNames.Registered)] public Notification Put(int id, [FromBody] Notification notification) { - if (ModelState.IsValid && notification.SiteId == _alias.SiteId && _notifications.GetNotification(notification.NotificationId, false) != null && IsAuthorized(notification.FromUserId)) + if (ModelState.IsValid && notification.SiteId == _alias.SiteId && _notifications.GetNotification(notification.NotificationId, false) != null && (IsAuthorized(notification.FromUserId) || IsAuthorized(notification.ToUserId))) { notification = _notifications.UpdateNotification(notification); _syncManager.AddSyncEvent(_alias.TenantId, EntityNames.Notification, notification.NotificationId, SyncEventActions.Update); diff --git a/Oqtane.Server/Controllers/ThemeController.cs b/Oqtane.Server/Controllers/ThemeController.cs index cec332fe..131c4b1d 100644 --- a/Oqtane.Server/Controllers/ThemeController.cs +++ b/Oqtane.Server/Controllers/ThemeController.cs @@ -237,8 +237,8 @@ namespace Oqtane.Controllers if (theme.Version == "local") { text = text.Replace("[FrameworkVersion]", Constants.Version); - text = text.Replace("[ClientReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net7.0\\Oqtane.Client.dll"); - text = text.Replace("[SharedReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net7.0\\Oqtane.Shared.dll"); + text = text.Replace("[ClientReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net8.0\\Oqtane.Client.dll"); + text = text.Replace("[SharedReference]", $"..\\..\\{rootFolder}\\Oqtane.Server\\bin\\Debug\\net8.0\\Oqtane.Shared.dll"); } else { diff --git a/Oqtane.Server/Extensions/OqtaneSiteAuthenticationBuilderExtensions.cs b/Oqtane.Server/Extensions/OqtaneSiteAuthenticationBuilderExtensions.cs index 7bf5637e..a4b0ebaa 100644 --- a/Oqtane.Server/Extensions/OqtaneSiteAuthenticationBuilderExtensions.cs +++ b/Oqtane.Server/Extensions/OqtaneSiteAuthenticationBuilderExtensions.cs @@ -298,6 +298,7 @@ namespace Oqtane.Extensions if (identityuser != null) { user = _users.GetUser(identityuser.UserName); + user.SiteId = alias.SiteId; } else { @@ -351,7 +352,7 @@ namespace Oqtane.Extensions _notifications.AddNotification(notification); // add user login - await _identityUserManager.AddLoginAsync(identityuser, new UserLoginInfo(providerType + ":" + alias.SiteId.ToString(), id, providerName)); + await _identityUserManager.AddLoginAsync(identityuser, new UserLoginInfo(providerType + ":" + user.SiteId.ToString(), id, providerName)); _logger.Log(user.SiteId, LogLevel.Information, "ExternalLogin", Enums.LogFunction.Create, "User Added {User}", user); } @@ -380,18 +381,38 @@ namespace Oqtane.Extensions var login = logins.FirstOrDefault(item => item.LoginProvider == (providerType + ":" + alias.SiteId.ToString())); if (login == null) { - // new external login using existing user account - verification required - var _notifications = httpContext.RequestServices.GetRequiredService(); - string token = await _identityUserManager.GenerateEmailConfirmationTokenAsync(identityuser); - string url = httpContext.Request.Scheme + "://" + alias.Name; - url += $"/login?name={identityuser.UserName}&token={WebUtility.UrlEncode(token)}&key={WebUtility.UrlEncode(id)}"; - string body = $"You Recently Signed In To Our Site With {providerName} Using The Email Address {email}. "; - body += "In Order To Complete The Linkage Of Your User Account Please Click The Link Displayed Below:\n\n" + url + "\n\nThank You!"; - var notification = new Notification(alias.SiteId, email, email, "External Login Linkage", body); - _notifications.AddNotification(notification); + if (bool.Parse(httpContext.GetSiteSettings().GetValue("ExternalLogin:VerifyUsers", "true"))) + { + // external login using existing user account - verification required + var _notifications = httpContext.RequestServices.GetRequiredService(); + string token = await _identityUserManager.GenerateEmailConfirmationTokenAsync(identityuser); + string url = httpContext.Request.Scheme + "://" + alias.Name; + url += $"/login?name={identityuser.UserName}&token={WebUtility.UrlEncode(token)}&key={WebUtility.UrlEncode(id)}"; + string body = $"You Recently Signed In To Our Site With {providerName} Using The Email Address {email}. "; + body += "In Order To Complete The Linkage Of Your User Account Please Click The Link Displayed Below:\n\n" + url + "\n\nThank You!"; + var notification = new Notification(alias.SiteId, email, email, "External Login Linkage", body); + _notifications.AddNotification(notification); - identity.Label = ExternalLoginStatus.VerificationRequired; - _logger.Log(alias.SiteId, LogLevel.Information, "ExternalLogin", Enums.LogFunction.Create, "External Login Linkage Verification For Provider {Provider} Sent To {Email}", providerName, email); + identity.Label = ExternalLoginStatus.VerificationRequired; + _logger.Log(alias.SiteId, LogLevel.Information, "ExternalLogin", Enums.LogFunction.Create, "External Login Linkage Verification For Provider {Provider} Sent To {Email}", providerName, email); + } + else + { + // external login using existing user account - link automatically + user = _users.GetUser(identityuser.UserName); + user.SiteId = alias.SiteId; + + var _notifications = httpContext.RequestServices.GetRequiredService(); + string url = httpContext.Request.Scheme + "://" + alias.Name; + string body = "You Recently Used An External Account To Sign In To Our Site.\n\n" + url + "\n\nThank You!"; + var notification = new Notification(user.SiteId, user, "User Account Notification", body); + _notifications.AddNotification(notification); + + // add user login + await _identityUserManager.AddLoginAsync(identityuser, new UserLoginInfo(providerType + ":" + user.SiteId.ToString(), id, providerName)); + + _logger.Log(user.SiteId, LogLevel.Information, "ExternalLogin", Enums.LogFunction.Create, "External Login Linkage Created For User {Username} And Provider {Provider}", user.Username, providerName); + } } else { diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 8109b1cb..b3a2f4ac 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -1,9 +1,9 @@ - net7.0 + net8.0 Debug;Release - 4.0.6 + 5.0.0 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/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git Oqtane @@ -32,20 +32,20 @@ - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + diff --git a/Oqtane.Server/Pages/Files.cshtml.cs b/Oqtane.Server/Pages/Files.cshtml.cs index ab65c32c..f47ce1d2 100644 --- a/Oqtane.Server/Pages/Files.cshtml.cs +++ b/Oqtane.Server/Pages/Files.cshtml.cs @@ -3,6 +3,7 @@ using System.IO; using System.Net; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -96,7 +97,7 @@ namespace Oqtane.Pages } else { - HttpContext.Response.Headers.Add(HeaderNames.ETag, etag); + HttpContext.Response.Headers.Append(HeaderNames.ETag, etag); return PhysicalFile(filepath, file.GetMimeType()); } } diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index b583d90b..7ae2d43f 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -224,21 +224,21 @@ namespace Oqtane.Repository _roleRepository.AddRole(new Role {SiteId = site.SiteId, Name = RoleNames.Admin, Description = RoleNames.Admin, IsAutoAssigned = false, IsSystem = true}); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "FirstName", Title = "First Name", Description = "Your First Or Given Name", Category = "Name", ViewOrder = 1, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = ""}); + { SiteId = site.SiteId, Name = "FirstName", Title = "First Name", Description = "Your First Or Given Name", Category = "Name", ViewOrder = 1, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "LastName", Title = "Last Name", Description = "Your Last Or Family Name", Category = "Name", ViewOrder = 2, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "LastName", Title = "Last Name", Description = "Your Last Or Family Name", Category = "Name", ViewOrder = 2, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Street", Title = "Street", Description = "Street Or Building Address", Category = "Address", ViewOrder = 3, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); - _profileRepository.AddProfile( - new Profile {SiteId = site.SiteId, Name = "City", Title = "City", Description = "City", Category = "Address", ViewOrder = 4, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Street", Title = "Street", Description = "Street Or Building Address", Category = "Address", ViewOrder = 3, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); + _profileRepository.AddProfile(new Profile + { SiteId = site.SiteId, Name = "City", Title = "City", Description = "City", Category = "Address", ViewOrder = 4, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Region", Title = "Region", Description = "State Or Province", Category = "Address", ViewOrder = 5, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Region", Title = "Region", Description = "State Or Province", Category = "Address", ViewOrder = 5, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Country", Title = "Country", Description = "Country", Category = "Address", ViewOrder = 6, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Country", Title = "Country", Description = "Country", Category = "Address", ViewOrder = 6, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "PostalCode", Title = "Postal Code", Description = "Postal Code Or Zip Code", Category = "Address", ViewOrder = 7, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "PostalCode", Title = "Postal Code", Description = "Postal Code Or Zip Code", Category = "Address", ViewOrder = 7, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Phone", Title = "Phone Number", Description = "Phone Number", Category = "Contact", ViewOrder = 8, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Phone", Title = "Phone Number", Description = "Phone Number", Category = "Contact", ViewOrder = 8, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); Folder folder = _folderRepository.AddFolder(new Folder { diff --git a/Oqtane.Server/appsettings.json b/Oqtane.Server/appsettings.json index a518f1a2..ccf00c5c 100644 --- a/Oqtane.Server/appsettings.json +++ b/Oqtane.Server/appsettings.json @@ -1,7 +1,7 @@ { "Runtime": "Server", "RenderMode": "ServerPrerendered", - "Database": { + "Database": { "DefaultDBType": "" }, "ConnectionStrings": { @@ -44,5 +44,15 @@ "ControlType": "Oqtane.Installer.Controls.PostgreSQLConfig, Oqtane.Client", "DBType": "Oqtane.Database.PostgreSQL.PostgreSQLDatabase, Oqtane.Database.PostgreSQL" } - ] + ], + "Logging": { + "FileLogger": { + "LogLevel": { + "Default": "Error" + } + }, + "LogLevel": { + "Default": "Information" + } + } } diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj index d0046940..4b52c2a8 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].Module.[Module].Client.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 1.0.0 [Owner] [Owner] @@ -13,11 +13,11 @@ - - - - - + + + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].Package.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].Package.csproj index 22da0751..c7fe75a7 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].Package.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].Package.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].nuspec b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].nuspec index f148f2d3..a09ebb95 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].nuspec +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].Module.[Module].nuspec @@ -20,13 +20,13 @@ - - - - - - + + + + + + - \ No newline at end of file + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd index 6f8b554a..e59e74cd 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd @@ -1,7 +1,7 @@ -XCOPY "..\Client\bin\Debug\net7.0\[Owner].Module.[Module].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Client\bin\Debug\net7.0\[Owner].Module.[Module].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Server\bin\Debug\net7.0\[Owner].Module.[Module].Server.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Server\bin\Debug\net7.0\[Owner].Module.[Module].Server.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Shared\bin\Debug\net7.0\[Owner].Module.[Module].Shared.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Shared\bin\Debug\net7.0\[Owner].Module.[Module].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y +XCOPY "..\Client\bin\Debug\net8.0\[Owner].Module.[Module].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Client\bin\Debug\net8.0\[Owner].Module.[Module].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Server\bin\Debug\net8.0\[Owner].Module.[Module].Server.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Server\bin\Debug\net8.0\[Owner].Module.[Module].Server.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Shared\bin\Debug\net8.0\[Owner].Module.[Module].Shared.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Shared\bin\Debug\net8.0\[Owner].Module.[Module].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y XCOPY "..\Server\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.sh b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.sh index fbf7c393..792ce75c 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.sh +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.sh @@ -1,7 +1,7 @@ -cp -f "../Client/bin/Debug/net7.0/[Owner].Module.[Module].Client.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Client/bin/Debug/net7.0/[Owner].Module.[Module].Client.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Server/bin/Debug/net7.0/[Owner].Module.[Module].Server.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Server/bin/Debug/net7.0/[Owner].Module.[Module].Server.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Shared/bin/Debug/net7.0/[Owner].Module.[Module].Shared.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Shared/bin/Debug/net7.0/[Owner].Module.[Module].Shared.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -rf "../Server/wwwroot/"* "../../oqtane.framework/Oqtane.Server/wwwroot/" \ No newline at end of file +cp -f "../Client/bin/Debug/net8.0/[Owner].Module.[Module].Client.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Client/bin/Debug/net8.0/[Owner].Module.[Module].Client.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Server/bin/Debug/net8.0/[Owner].Module.[Module].Server.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Server/bin/Debug/net8.0/[Owner].Module.[Module].Server.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Shared/bin/Debug/net8.0/[Owner].Module.[Module].Shared.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Shared/bin/Debug/net8.0/[Owner].Module.[Module].Shared.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -rf "../Server/wwwroot/"* "../../oqtane.framework/Oqtane.Server/wwwroot/" diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].Module.[Module].Server.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].Module.[Module].Server.csproj index d77b6676..821c731e 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].Module.[Module].Server.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].Module.[Module].Server.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 true 1.0.0 [Owner].Module.[Module] @@ -19,10 +19,10 @@ - - - - + + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].Module.[Module].Shared.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].Module.[Module].Shared.csproj index e59810e0..a4cc724b 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].Module.[Module].Shared.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].Module.[Module].Shared.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 1.0.0 [Owner].Module.[Module] [Owner] diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/template.json b/Oqtane.Server/wwwroot/Modules/Templates/External/template.json index 493c825e..1b2aab40 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/template.json +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/template.json @@ -1,6 +1,6 @@ { "Title": "Default Module Template", "Type": "External", - "Version": "4.0.3", + "Version": "5.0.0", "Namespace": "[Owner].Module.[Module]" } diff --git a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.MySQL.nupkg.bak b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.MySQL.nupkg.bak index 8b5279e1..bf3892df 100644 Binary files a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.MySQL.nupkg.bak and b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.MySQL.nupkg.bak differ diff --git a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.PostgreSQL.nupkg.bak b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.PostgreSQL.nupkg.bak index 672b26c8..dffb63c7 100644 Binary files a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.PostgreSQL.nupkg.bak and b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.PostgreSQL.nupkg.bak differ diff --git a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.SqlServer.nupkg.bak b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.SqlServer.nupkg.bak index edecee24..2feef754 100644 Binary files a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.SqlServer.nupkg.bak and b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.SqlServer.nupkg.bak differ diff --git a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.Sqlite.nupkg.bak b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.Sqlite.nupkg.bak index 81f02141..e8f6ca87 100644 Binary files a/Oqtane.Server/wwwroot/Packages/Oqtane.Database.Sqlite.nupkg.bak and b/Oqtane.Server/wwwroot/Packages/Oqtane.Database.Sqlite.nupkg.bak differ diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].Theme.[Theme].Client.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].Theme.[Theme].Client.csproj index 0799ae41..e7e32630 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].Theme.[Theme].Client.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].Theme.[Theme].Client.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 1.0.0 [Owner] [Owner] @@ -12,11 +12,11 @@ - - - - - + + + + + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].Package.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].Package.csproj index 72abdcf5..908a23b4 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].Package.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].Package.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].nuspec b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].nuspec index ea341aee..584fc6a6 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].nuspec +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].Theme.[Theme].nuspec @@ -20,9 +20,9 @@ - - + + - \ No newline at end of file + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd index 1cda25a6..2ece53b9 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd @@ -1,3 +1,3 @@ -XCOPY "..\Client\bin\Debug\net7.0\[Owner].Theme.[Theme].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y -XCOPY "..\Client\bin\Debug\net7.0\[Owner].Theme.[Theme].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y +XCOPY "..\Client\bin\Debug\net8.0\[Owner].Theme.[Theme].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y +XCOPY "..\Client\bin\Debug\net8.0\[Owner].Theme.[Theme].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net8.0\" /Y XCOPY "..\Client\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.sh b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.sh index 29b5ef17..52ec3384 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.sh +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.sh @@ -1,3 +1,3 @@ -cp -f "../Client/bin/Debug/net7.0/[Owner].Theme.[Theme].Client.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -f "../Client/bin/Debug/net7.0/[Owner].Theme.[Theme].Client.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net7.0/" -cp -rf "../Server/wwwroot/"* "../../oqtane.framework/Oqtane.Server/wwwroot/" \ No newline at end of file +cp -f "../Client/bin/Debug/net8.0/[Owner].Theme.[Theme].Client.Oqtane.dll" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -f "../Client/bin/Debug/net8.0/[Owner].Theme.[Theme].Client.Oqtane.pdb" "../../oqtane.framework/Oqtane.Server/bin/Debug/net8.0/" +cp -rf "../Server/wwwroot/"* "../../oqtane.framework/Oqtane.Server/wwwroot/" diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/template.json b/Oqtane.Server/wwwroot/Themes/Templates/External/template.json index 7c3b80bb..17900439 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/template.json +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/template.json @@ -1,6 +1,6 @@ { "Title": "Default Theme Template", "Type": "External", - "Version": "4.0.3", + "Version": "5.0.0", "Namespace": "[Owner].Theme.[Theme]" } diff --git a/Oqtane.Shared/Oqtane.Shared.csproj b/Oqtane.Shared/Oqtane.Shared.csproj index 3b8dfa3d..645cbf3e 100644 --- a/Oqtane.Shared/Oqtane.Shared.csproj +++ b/Oqtane.Shared/Oqtane.Shared.csproj @@ -1,9 +1,9 @@ - net7.0 + net8.0 Debug;Release - 4.0.6 + 5.0.0 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/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git Oqtane @@ -19,11 +19,11 @@ - - - + + + - + diff --git a/Oqtane.Shared/Shared/Constants.cs b/Oqtane.Shared/Shared/Constants.cs index 0e0ec0d4..45bb7c91 100644 --- a/Oqtane.Shared/Shared/Constants.cs +++ b/Oqtane.Shared/Shared/Constants.cs @@ -7,8 +7,8 @@ namespace Oqtane.Shared { public class Constants { - public static readonly string Version = "4.0.6"; - 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,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0,3.0.1,3.0.2,3.0.3,3.1.0,3.1.1,3.1.2,3.1.3,3.1.4,3.2.0,3.2.1,3.3.0,3.3.1,3.4.0,3.4.1,3.4.2,3.4.3,4.0.0,4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6"; + public static readonly string Version = "5.0.0"; + 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,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0,3.0.1,3.0.2,3.0.3,3.1.0,3.1.1,3.1.2,3.1.3,3.1.4,3.2.0,3.2.1,3.3.0,3.3.1,3.4.0,3.4.1,3.4.2,3.4.3,4.0.0,4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6,5.0.0"; public const string PackageId = "Oqtane.Framework"; public const string ClientId = "Oqtane.Client"; public const string UpdaterPackageId = "Oqtane.Updater"; diff --git a/Oqtane.Updater/Oqtane.Updater.csproj b/Oqtane.Updater/Oqtane.Updater.csproj index 8d88d00c..6218d42f 100644 --- a/Oqtane.Updater/Oqtane.Updater.csproj +++ b/Oqtane.Updater/Oqtane.Updater.csproj @@ -1,9 +1,9 @@ - net7.0 + net8.0 Exe - 4.0.6 + 5.0.0 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/v4.0.6 + https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0 https://github.com/oqtane/oqtane.framework Git Oqtane