From d95104cb924008d928366c7e6313fbe5af8f124c Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Wed, 30 Jul 2025 15:23:16 -0400
Subject: [PATCH 01/53] update Azure ARM template to 6.1.4
---
azuredeploy.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/azuredeploy.json b/azuredeploy.json
index d7970211..f4718349 100644
--- a/azuredeploy.json
+++ b/azuredeploy.json
@@ -220,7 +220,7 @@
"apiVersion": "2024-04-01",
"name": "[concat(parameters('BlazorWebsiteName'), '/ZipDeploy')]",
"properties": {
- "packageUri": "https://github.com/oqtane/oqtane.framework/releases/download/v6.1.3/Oqtane.Framework.6.1.3.Install.zip"
+ "packageUri": "https://github.com/oqtane/oqtane.framework/releases/download/v6.1.4/Oqtane.Framework.6.1.4.Install.zip"
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('BlazorWebsiteName'))]"
From 752083e9eb2b89af9988f473a3e869915ba289c5 Mon Sep 17 00:00:00 2001
From: Shaun Walker
Date: Wed, 30 Jul 2025 15:29:19 -0400
Subject: [PATCH 02/53] Update README.md
---
README.md | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 10112a56..cdad0222 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Oqtane is being developed based on some fundamental principles which are outline
# Latest Release
-[6.1.3](https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.3) was released on May 29, 2025 and is a maintenance release including 59 pull requests by 5 different contributors, pushing the total number of project commits all-time to over 6600. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers.
+[6.1.4](https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.4) was released on July 30, 2025 and is a maintenance release including 49 pull requests by 4 different contributors, pushing the total number of project commits all-time to over 6700. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers.
# Try It Now!
@@ -26,7 +26,7 @@ A free ASP.NET hosting account. No hidden fees. No credit card required.
**Installing using source code from the Dev/Master branch:**
-- Install **[.NET 9.0.5 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)**.
+- Install **[.NET 9.0.7 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)**.
- 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**.
@@ -92,8 +92,15 @@ 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.1.4](https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.4) (Jul 30, 2025)
+- [x] Stabilization improvements
+- [x] SMTP OAuth2 Support
+
[6.1.3](https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.3) (May 29, 2025)
-- [x] Stabilization improvements
+- [x] Stabilization improvements
+- [x] Time zone support
+- [x] Module header/footer content
+- [x] Module import/export from files
[6.1.2](https://github.com/oqtane/oqtane.framework/releases/tag/v6.1.2) (Apr 10, 2025)
- [x] Stabilization improvements
From 50fa95dff9e0b6f5b8798ee382a47376d741cbf4 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 31 Jul 2025 11:04:22 -0400
Subject: [PATCH 03/53] resolve interactive rendering issue
---
Oqtane.Client/UI/Routes.razor | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/Oqtane.Client/UI/Routes.razor b/Oqtane.Client/UI/Routes.razor
index 6081966c..baf8596a 100644
--- a/Oqtane.Client/UI/Routes.razor
+++ b/Oqtane.Client/UI/Routes.razor
@@ -48,18 +48,12 @@
private bool _initialized = false;
private bool _installed = false;
- private string _display = "";
+ private string _display = "display: none;"; // prevents flash on initial interactive page load when using prerendering
private PageState _pageState { get; set; }
protected override async Task OnParametersSetAsync()
{
- if (PageState != null && PageState.RenderMode == RenderModes.Interactive && PageState.Site.Prerender)
- {
- // prevents flash on initial interactive page load when using prerendering
- _display = "display: none;";
- }
-
SiteState.AntiForgeryToken = AntiForgeryToken;
SiteState.AuthorizationToken = AuthorizationToken;
SiteState.Platform = Platform;
@@ -89,9 +83,10 @@
protected override void OnAfterRender(bool firstRender)
{
- if (firstRender)
+ if (firstRender && _display == "display: none;")
{
_display = "";
+ StateHasChanged(); // required or else the UI will not refresh
}
}
From 85ae7b01b865be24429fe5484c83b775a1f2ff48 Mon Sep 17 00:00:00 2001
From: Cody
Date: Thu, 31 Jul 2025 09:11:09 -0700
Subject: [PATCH 04/53] Update Oqtane.Server.csproj Package Dependencies
---
Oqtane.Server/Oqtane.Server.csproj | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj
index 44bab0f5..69f4d601 100644
--- a/Oqtane.Server/Oqtane.Server.csproj
+++ b/Oqtane.Server/Oqtane.Server.csproj
@@ -36,7 +36,7 @@
-
+
all
@@ -45,8 +45,8 @@
-
-
+
+
From 30fcde7157532d19ede87182a82a4e3c02b59012 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 31 Jul 2025 16:06:42 -0400
Subject: [PATCH 05/53] improve notification message when email is verified by
administrator
---
Oqtane.Server/Managers/UserManager.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Oqtane.Server/Managers/UserManager.cs b/Oqtane.Server/Managers/UserManager.cs
index 5f9cd8dc..76411019 100644
--- a/Oqtane.Server/Managers/UserManager.cs
+++ b/Oqtane.Server/Managers/UserManager.cs
@@ -261,7 +261,8 @@ namespace Oqtane.Managers
var emailConfirmationToken = await _identityUserManager.GenerateEmailConfirmationTokenAsync(identityuser);
await _identityUserManager.ConfirmEmailAsync(identityuser, emailConfirmationToken);
- string body = "Dear " + user.DisplayName + ",\n\nThe Email Address For Your User Account Has Been Verified. You Can Now Login With Your Username And Password.";
+ string url = alias.Protocol + alias.Name + "/login?name=" + user.Username;
+ string body = "Dear " + user.DisplayName + ",\n\nThe Email Address For Your User Account Has Been Verified. You Can Now Login With Your Username And Password Using The Link Displayed Below:\n\n" + url + "\n\nThank You!";
var notification = new Notification(user.SiteId, user, "User Account Verification", body);
_notifications.AddNotification(notification);
}
From 4c2960eeae8dff049cc1a038d50cfeded834d4de Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 31 Jul 2025 16:23:40 -0400
Subject: [PATCH 06/53] log the logout event
---
Oqtane.Server/Pages/Logout.cshtml.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Oqtane.Server/Pages/Logout.cshtml.cs b/Oqtane.Server/Pages/Logout.cshtml.cs
index 5d16ea84..72329c11 100644
--- a/Oqtane.Server/Pages/Logout.cshtml.cs
+++ b/Oqtane.Server/Pages/Logout.cshtml.cs
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
+using Oqtane.Enums;
using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Managers;
@@ -16,11 +17,13 @@ namespace Oqtane.Pages
{
private readonly IUserManager _userManager;
private readonly ISyncManager _syncManager;
+ private readonly ILogManager _logger;
- public LogoutModel(IUserManager userManager, ISyncManager syncManager)
+ public LogoutModel(IUserManager userManager, ISyncManager syncManager, ILogManager logger)
{
_userManager = userManager;
_syncManager = syncManager;
+ _logger = logger;
}
public async Task OnPostAsync(string returnurl, string everywhere)
@@ -37,6 +40,7 @@ namespace Oqtane.Pages
}
_syncManager.AddSyncEvent(alias, EntityNames.User, user.UserId, "Logout");
_syncManager.AddSyncEvent(alias, EntityNames.User, user.UserId, SyncEventActions.Reload);
+ _logger.Log(LogLevel.Information, this, LogFunction.Security, "User Logout For Username {Username}", user.Username);
}
await HttpContext.SignOutAsync(Constants.AuthenticationScheme);
From 9ae12ff6788cd5a658a06309201b3cf43cad8f9a Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Fri, 1 Aug 2025 07:51:58 -0400
Subject: [PATCH 07/53] Resolve issue where visitor cookie was not being added
to HttpClient. This was because cookie values cannot contain spaces and
therefore need to be Url encoded.
---
Oqtane.Server/Controllers/SettingController.cs | 13 +++++++++----
Oqtane.Server/Controllers/VisitorController.cs | 11 ++++++++---
.../Extensions/OqtaneServiceCollectionExtensions.cs | 4 ++--
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/Oqtane.Server/Controllers/SettingController.cs b/Oqtane.Server/Controllers/SettingController.cs
index 2c33c958..b2db2def 100644
--- a/Oqtane.Server/Controllers/SettingController.cs
+++ b/Oqtane.Server/Controllers/SettingController.cs
@@ -298,7 +298,7 @@ namespace Oqtane.Controllers
if (!authorized)
{
var visitorCookieName = Constants.VisitorCookiePrefix + _alias.SiteId.ToString();
- authorized = (entityId == GetVisitorCookieId(Request.Cookies[visitorCookieName]));
+ authorized = (entityId == GetVisitorCookieId(HttpContext.Request.Cookies[visitorCookieName]));
}
break;
default: // custom entity
@@ -352,9 +352,14 @@ namespace Oqtane.Controllers
private int GetVisitorCookieId(string visitorCookie)
{
- // visitor cookies contain the visitor id and an expiry date separated by a pipe symbol
- visitorCookie = (visitorCookie.Contains("|")) ? visitorCookie.Split('|')[0] : visitorCookie;
- return (int.TryParse(visitorCookie, out int visitorId)) ? visitorId : -1;
+ var visitorId = -1;
+ if (visitorCookie != null)
+ {
+ // visitor cookies now contain the visitor id and an expiry date separated by a pipe symbol
+ visitorCookie = (visitorCookie.Contains("|")) ? visitorCookie.Split('|')[0] : visitorCookie;
+ visitorId = int.TryParse(visitorCookie, out int _visitorId) ? _visitorId : -1;
+ }
+ return visitorId;
}
private void AddSyncEvent(string EntityName, int EntityId, int SettingId, string Action)
diff --git a/Oqtane.Server/Controllers/VisitorController.cs b/Oqtane.Server/Controllers/VisitorController.cs
index e0074452..707d2290 100644
--- a/Oqtane.Server/Controllers/VisitorController.cs
+++ b/Oqtane.Server/Controllers/VisitorController.cs
@@ -77,9 +77,14 @@ namespace Oqtane.Controllers
private int GetVisitorCookieId(string visitorCookie)
{
- // visitor cookies contain the visitor id and an expiry date separated by a pipe symbol
- visitorCookie = (visitorCookie.Contains("|")) ? visitorCookie.Split('|')[0] : visitorCookie;
- return (int.TryParse(visitorCookie, out int visitorId)) ? visitorId : -1;
+ var visitorId = -1;
+ if (visitorCookie != null)
+ {
+ // visitor cookies now contain the visitor id and an expiry date separated by a pipe symbol
+ visitorCookie = (visitorCookie.Contains("|")) ? visitorCookie.Split('|')[0] : visitorCookie;
+ visitorId = int.TryParse(visitorCookie, out int _visitorId) ? _visitorId : -1;
+ }
+ return visitorId;
}
}
}
diff --git a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs
index 3ab2d87f..32fd81ba 100644
--- a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs
+++ b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs
@@ -257,7 +257,7 @@ namespace Microsoft.Extensions.DependencyInjection
// set the cookies to allow HttpClient API calls to be authenticated
foreach (var cookie in httpContextAccessor.HttpContext.Request.Cookies)
{
- client.DefaultRequestHeaders.Add("Cookie", cookie.Key + "=" + cookie.Value);
+ client.DefaultRequestHeaders.Add("Cookie", cookie.Key + "=" + WebUtility.UrlEncode(cookie.Value));
}
}
@@ -275,7 +275,7 @@ namespace Microsoft.Extensions.DependencyInjection
// set the cookies to allow HttpClient API calls to be authenticated
foreach (var cookie in httpContextAccessor.HttpContext.Request.Cookies)
{
- client.DefaultRequestHeaders.Add("Cookie", cookie.Key + "=" + cookie.Value);
+ client.DefaultRequestHeaders.Add("Cookie", cookie.Key + "=" + WebUtility.UrlEncode(cookie.Value));
}
}
});
From 02861b8e016c9084c2b694b1a335f55163818a6e Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Fri, 1 Aug 2025 09:14:58 -0400
Subject: [PATCH 08/53] fix AddModuleMessage not displaying messages in
Interactive render mode
---
Oqtane.Client/UI/RenderModeBoundary.razor | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Oqtane.Client/UI/RenderModeBoundary.razor b/Oqtane.Client/UI/RenderModeBoundary.razor
index dbaac7f5..4e2f38f1 100644
--- a/Oqtane.Client/UI/RenderModeBoundary.razor
+++ b/Oqtane.Client/UI/RenderModeBoundary.razor
@@ -64,8 +64,6 @@
protected override void OnParametersSet()
{
- _messageContent = "";
-
if (ShouldRender())
{
if (!string.IsNullOrEmpty(ModuleState.ModuleType))
@@ -107,7 +105,7 @@
public void AddModuleMessage(string message, MessageType type, string position)
{
- if(message != _messageContent
+ if (message != _messageContent
|| type != _messageType
|| position != _messagePosition)
{
From aa9664e187bc7dc60ceb8f687d17bf99e9d99ad5 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Fri, 1 Aug 2025 10:54:40 -0400
Subject: [PATCH 09/53] improve broken link handling
---
Oqtane.Server/Repository/UrlMappingRepository.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Oqtane.Server/Repository/UrlMappingRepository.cs b/Oqtane.Server/Repository/UrlMappingRepository.cs
index 774c3189..82f747da 100644
--- a/Oqtane.Server/Repository/UrlMappingRepository.cs
+++ b/Oqtane.Server/Repository/UrlMappingRepository.cs
@@ -68,6 +68,7 @@ namespace Oqtane.Repository
public UrlMapping GetUrlMapping(int siteId, string url)
{
using var db = _dbContextFactory.CreateDbContext();
+ url = (url.StartsWith("/")) ? url.Substring(1) : url;
url = (url.Length > 750) ? url.Substring(0, 750) : url;
var urlMapping = db.UrlMapping.Where(item => item.SiteId == siteId && item.Url == url).FirstOrDefault();
if (urlMapping == null)
@@ -82,7 +83,14 @@ namespace Oqtane.Repository
urlMapping.Requests = 1;
urlMapping.CreatedOn = DateTime.UtcNow;
urlMapping.RequestedOn = DateTime.UtcNow;
- urlMapping = AddUrlMapping(urlMapping);
+ try
+ {
+ urlMapping = AddUrlMapping(urlMapping);
+ }
+ catch
+ {
+ // ignore duplicate key exception which can be caused by a race condition
+ }
}
}
else
From 23c3c47db4df6d814f5618c6a649f93e8ccf7f63 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Fri, 1 Aug 2025 14:45:40 -0400
Subject: [PATCH 10/53] add active/deleted filter in User Management
---
Oqtane.Client/Modules/Admin/Users/Edit.razor | 2 +-
Oqtane.Client/Modules/Admin/Users/Index.razor | 52 ++++++++++++++-----
.../Resources/Modules/Admin/Users/Index.resx | 6 +++
3 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/Oqtane.Client/Modules/Admin/Users/Edit.razor b/Oqtane.Client/Modules/Admin/Users/Edit.razor
index 2d75d27a..35e43bb9 100644
--- a/Oqtane.Client/Modules/Admin/Users/Edit.razor
+++ b/Oqtane.Client/Modules/Admin/Users/Edit.razor
@@ -153,7 +153,7 @@
@SharedLocalizer["Cancel"]
- @if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) && PageState.Runtime != Shared.Runtime.Hybrid && !_ishost)
+ @if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) && PageState.Runtime != Shared.Runtime.Hybrid && !_ishost && _isdeleted != "True")
{
}
diff --git a/Oqtane.Client/Modules/Admin/Users/Index.razor b/Oqtane.Client/Modules/Admin/Users/Index.razor
index 7e53d87e..53218b3c 100644
--- a/Oqtane.Client/Modules/Admin/Users/Index.razor
+++ b/Oqtane.Client/Modules/Admin/Users/Index.razor
@@ -17,8 +17,21 @@ else
{
-
-
+
+
+
+
+
+
+
+
+
@@ -495,6 +508,7 @@ else
@code {
private List users;
+ private string _deleted = "false";
private string _allowregistration;
private string _registerurl;
@@ -564,7 +578,7 @@ else
protected override async Task OnInitializedAsync()
{
- await LoadUsersAsync(true);
+ await LoadUsersAsync();
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
_allowregistration = PageState.Site.AllowRegistration.ToString().ToLower();
@@ -636,20 +650,32 @@ else
_allowsitelogin = SettingService.GetSetting(settings, "LoginOptions:AllowSiteLogin", "true");
}
- private async Task LoadUsersAsync(bool load)
+ private async Task LoadUsersAsync()
{
- if (load)
+ users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
{
- users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
- if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
- {
- var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
- users.AddRange(hosts);
- users = users.OrderBy(u => u.User.DisplayName).ToList();
- }
+ var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
+ users.AddRange(hosts);
+ users = users.OrderBy(u => u.User.DisplayName).ToList();
}
+ users = users.Where(item => item.User.IsDeleted == bool.Parse(_deleted)).ToList();
}
+ private async void DeletedChanged(ChangeEventArgs e)
+ {
+ try
+ {
+ _deleted = e.Value.ToString();
+ await LoadUsersAsync();
+ StateHasChanged();
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error On DeletedChanged");
+ }
+ }
+
private async Task DeleteUser(UserRole UserRole)
{
try
@@ -672,7 +698,7 @@ else
await logger.LogInformation("User {Username} Expired From Role {Role}", userrole.User.Username, userrole.Role.Name);
}
AddModuleMessage(Localizer["Success.DeleteUser"], MessageType.Success);
- await LoadUsersAsync(true);
+ await LoadUsersAsync();
StateHasChanged();
}
catch (Exception ex)
diff --git a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
index 1a008727..16e0d40e 100644
--- a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
+++ b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
@@ -537,4 +537,10 @@
Indicate if host roles are supported from the identity provider. Please use caution with this option as it allows the host user to administrate every site within your installation.
+
+ Active Users
+
+
+ Deleted Users
+
\ No newline at end of file
From 61194173313af67cb828c050a7b8366eed501a3e Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Fri, 1 Aug 2025 15:43:21 -0400
Subject: [PATCH 11/53] improve interactive rendering logic
---
Oqtane.Client/UI/Routes.razor | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Oqtane.Client/UI/Routes.razor b/Oqtane.Client/UI/Routes.razor
index baf8596a..e029fd6d 100644
--- a/Oqtane.Client/UI/Routes.razor
+++ b/Oqtane.Client/UI/Routes.razor
@@ -83,10 +83,13 @@
protected override void OnAfterRender(bool firstRender)
{
- if (firstRender && _display == "display: none;")
+ if (firstRender)
{
_display = "";
- StateHasChanged(); // required or else the UI will not refresh
+ if (PageState != null && PageState.Site.Prerender)
+ {
+ StateHasChanged(); // required or else the UI will not refresh
+ }
}
}
From 334137454e09a6ac04f4fe3d44442257e7880c00 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Sat, 2 Aug 2025 09:46:02 -0400
Subject: [PATCH 12/53] improve FileManager performance when ShowFiles is
disabled
---
.../Modules/Controls/FileManager.razor | 51 ++++++++++++-------
1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor
index 9581c58a..af092f0d 100644
--- a/Oqtane.Client/Modules/Controls/FileManager.razor
+++ b/Oqtane.Client/Modules/Controls/FileManager.razor
@@ -447,20 +447,31 @@
}
else
{
- // set FileId to first file in upload collection
- var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
- if (file != null)
+ if (AnonymizeUploadFilenames)
{
- FileId = file.FileId;
- await SetImage();
-#pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
-#pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- await OnUpload.InvokeAsync(FileId);
+ // it is not possible to determine the FileId of the uploaded file when filenames are anonymized
+ await OnUpload.InvokeAsync(-1);
+ }
+ else
+ {
+ // set FileId to first file in upload collection
+ var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
+ if (file != null)
+ {
+ FileId = file.FileId;
+ await SetImage();
+#pragma warning disable CS0618
+ await OnSelect.InvokeAsync(FileId);
+#pragma warning restore CS0618
+ await OnSelectFile.InvokeAsync(FileId);
+ await OnUpload.InvokeAsync(FileId);
+ }
+ }
+ if (ShowFiles)
+ {
+ await GetFiles();
+ StateHasChanged();
}
- await GetFiles();
- StateHasChanged();
}
}
catch (Exception ex)
@@ -492,6 +503,7 @@
private async Task DeleteFile()
{
_message = string.Empty;
+
try
{
await FileService.DeleteFileAsync(FileId);
@@ -504,14 +516,17 @@
_messagetype = MessageType.Success;
}
- await GetFiles();
- FileId = -1;
- await SetImage();
+ if (ShowFiles)
+ {
+ await GetFiles();
+ FileId = -1;
+ await SetImage();
#pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
+ await OnSelect.InvokeAsync(FileId);
#pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- StateHasChanged();
+ await OnSelectFile.InvokeAsync(FileId);
+ StateHasChanged();
+ }
}
catch (Exception ex)
{
From 77949331e2bc64196be7add23cb7574910d1ff17 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 4 Aug 2025 13:06:16 -0400
Subject: [PATCH 13/53] improve FileManager performance
---
.../Modules/Controls/FileManager.razor | 266 +++++++++---------
1 file changed, 133 insertions(+), 133 deletions(-)
diff --git a/Oqtane.Client/Modules/Controls/FileManager.razor b/Oqtane.Client/Modules/Controls/FileManager.razor
index af092f0d..c3ac1846 100644
--- a/Oqtane.Client/Modules/Controls/FileManager.razor
+++ b/Oqtane.Client/Modules/Controls/FileManager.razor
@@ -107,7 +107,7 @@
@code {
private bool _initialized = false;
- private List _folders;
+ private List _folders = new List();
private List _files = new List();
private string _fileinputid = string.Empty;
private string _progressinfoid = string.Empty;
@@ -198,19 +198,22 @@
Filter = "nupkg";
ShowSuccess = true;
}
-
- if (!string.IsNullOrEmpty(Folder) && Folder != Constants.PackagesFolder)
+ else
{
- Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
- if (folder != null)
+ // folder path specified rather than folderid
+ if (!string.IsNullOrEmpty(Folder))
{
- FolderId = folder.FolderId;
- }
- else
- {
- FolderId = -1;
- _message = "Folder Path " + Folder + " Does Not Exist";
- _messagetype = MessageType.Error;
+ Folder folder = await FolderService.GetFolderAsync(ModuleState.SiteId, Folder);
+ if (folder != null)
+ {
+ FolderId = folder.FolderId;
+ }
+ else
+ {
+ FolderId = -1;
+ _message = "Folder Path " + Folder + " Does Not Exist";
+ _messagetype = MessageType.Error;
+ }
}
}
@@ -245,25 +248,24 @@
}
}
- await SetImage();
-
if (!string.IsNullOrEmpty(Filter))
{
_filter = "." + Filter.Replace(",", ",.");
}
+ GetFolderPermission();
+ await SetImage();
await GetFiles();
_initialized = true;
}
- private async Task GetFiles()
+ private void GetFolderPermission()
{
_haseditpermission = false;
if (Folder == Constants.PackagesFolder)
{
_haseditpermission = UserSecurity.IsAuthorized(PageState.User, RoleNames.Host);
- _files = new List();
}
else
{
@@ -271,69 +273,14 @@
if (folder != null)
{
_haseditpermission = UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, folder.PermissionList);
- if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Browse, folder.PermissionList))
- {
- _files = await FileService.GetFilesAsync(FolderId);
- }
- else
- {
- _files = new List();
- }
}
else
{
_haseditpermission = false;
- _files = new List();
- }
- if (_filter != "*")
- {
- List filtered = new List();
- foreach (File file in _files)
- {
- if (_filter.ToUpper().IndexOf("." + file.Extension.ToUpper()) != -1)
- {
- filtered.Add(file);
- }
- }
- _files = filtered;
}
}
}
- private async Task FolderChanged(ChangeEventArgs e)
- {
- _message = string.Empty;
- try
- {
- FolderId = int.Parse((string)e.Value);
- await GetFiles();
- FileId = -1;
- _file = null;
- _image = string.Empty;
-
- await OnSelectFolder.InvokeAsync(FolderId);
- StateHasChanged();
- }
- catch (Exception ex)
- {
- await logger.LogError(ex, "Error Loading Files {Error}", ex.Message);
- _message = Localizer["Error.File.Load"];
- _messagetype = MessageType.Error;
- }
- }
-
- private async Task FileChanged(ChangeEventArgs e)
- {
- _message = string.Empty;
- FileId = int.Parse((string)e.Value);
- await SetImage();
- #pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
- #pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- StateHasChanged();
- }
-
private async Task SetImage()
{
_image = string.Empty;
@@ -357,6 +304,74 @@
}
}
+ private async Task GetFiles()
+ {
+ if (ShowFiles)
+ {
+ Folder folder = _folders.FirstOrDefault(item => item.FolderId == FolderId);
+ if (folder != null)
+ {
+ if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Browse, folder.PermissionList))
+ {
+ _files = await FileService.GetFilesAsync(FolderId);
+ }
+ else
+ {
+ _files = new List();
+ }
+ }
+ else
+ {
+ _files = new List();
+ }
+ if (_filter != "*")
+ {
+ List filtered = new List();
+ foreach (File file in _files)
+ {
+ if (_filter.ToUpper().IndexOf("." + file.Extension.ToUpper()) != -1)
+ {
+ filtered.Add(file);
+ }
+ }
+ _files = filtered;
+ }
+ }
+ }
+
+ private async Task FolderChanged(ChangeEventArgs e)
+ {
+ _message = string.Empty;
+ try
+ {
+ FolderId = int.Parse((string)e.Value);
+ await OnSelectFolder.InvokeAsync(FolderId);
+ FileId = -1;
+ GetFolderPermission();
+ await SetImage();
+ await GetFiles();
+ StateHasChanged();
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error Loading Files {Error}", ex.Message);
+ _message = Localizer["Error.File.Load"];
+ _messagetype = MessageType.Error;
+ }
+ }
+
+ private async Task FileChanged(ChangeEventArgs e)
+ {
+ _message = string.Empty;
+ FileId = int.Parse((string)e.Value);
+ #pragma warning disable CS0618
+ await OnSelect.InvokeAsync(FileId);
+ #pragma warning restore CS0618
+ await OnSelectFile.InvokeAsync(FileId);
+ await SetImage();
+ StateHasChanged();
+ }
+
private async Task UploadFiles()
{
_message = string.Empty;
@@ -433,45 +448,33 @@
_message = Localizer["Success.File.Upload"];
_messagetype = MessageType.Success;
}
- }
- else
- {
- await logger.LogError("File Upload Failed {Files}", uploads);
- _message = Localizer["Error.File.Upload"];
- _messagetype = MessageType.Error;
- }
- if (Folder == Constants.PackagesFolder)
- {
- await OnUpload.InvokeAsync(-1);
- }
- else
- {
- if (AnonymizeUploadFilenames)
- {
- // it is not possible to determine the FileId of the uploaded file when filenames are anonymized
- await OnUpload.InvokeAsync(-1);
- }
- else
+ FileId = -1;
+ if (Folder != Constants.PackagesFolder && !AnonymizeUploadFilenames)
{
// set FileId to first file in upload collection
var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
if (file != null)
{
FileId = file.FileId;
- await SetImage();
-#pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
-#pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- await OnUpload.InvokeAsync(FileId);
}
}
- if (ShowFiles)
- {
- await GetFiles();
- StateHasChanged();
- }
+
+ await OnUpload.InvokeAsync(FileId);
+#pragma warning disable CS0618
+ await OnSelect.InvokeAsync(FileId);
+#pragma warning restore CS0618
+ await OnSelectFile.InvokeAsync(FileId);
+
+ await SetImage();
+ await GetFiles();
+ StateHasChanged();
+ }
+ else
+ {
+ await logger.LogError("File Upload Failed {Files}", uploads);
+ _message = Localizer["Error.File.Upload"];
+ _messagetype = MessageType.Error;
}
}
catch (Exception ex)
@@ -485,7 +488,6 @@
finally {
tokenSource.Dispose();
}
-
}
else
{
@@ -503,7 +505,6 @@
private async Task DeleteFile()
{
_message = string.Empty;
-
try
{
await FileService.DeleteFileAsync(FileId);
@@ -516,50 +517,49 @@
_messagetype = MessageType.Success;
}
- if (ShowFiles)
- {
- await GetFiles();
- FileId = -1;
- await SetImage();
+ FileId = -1;
#pragma warning disable CS0618
- await OnSelect.InvokeAsync(FileId);
+ await OnSelect.InvokeAsync(FileId);
#pragma warning restore CS0618
- await OnSelectFile.InvokeAsync(FileId);
- StateHasChanged();
- }
- }
- catch (Exception ex)
- {
- await logger.LogError(ex, "Error Deleting File {File} {Error}", FileId, ex.Message);
+ await OnSelectFile.InvokeAsync(FileId);
- _message = Localizer["Error.File.Delete"];
- _messagetype = MessageType.Error;
- }
- }
+ await SetImage();
+ await GetFiles();
+ StateHasChanged();
+ }
+ catch (Exception ex)
+ {
+ await logger.LogError(ex, "Error Deleting File {File} {Error}", FileId, ex.Message);
- public int GetFileId() => FileId;
+ _message = Localizer["Error.File.Delete"];
+ _messagetype = MessageType.Error;
+ }
+ }
- public int GetFolderId() => FolderId;
+ public int GetFileId() => FileId;
- public File GetFile() => _file;
+ public int GetFolderId() => FolderId;
- public async Task Refresh()
- {
- await Refresh(-1);
- }
+ public File GetFile() => _file;
- public async Task Refresh(int fileId)
- {
- await GetFiles();
- if (fileId != -1)
+ public async Task Refresh()
+ {
+ await Refresh(-1);
+ }
+
+ public async Task Refresh(int fileId)
+ {
+ await GetFiles();
+ FileId = -1;
+ if (fileId != -1)
{
var file = _files.Where(item => item.FileId == fileId).FirstOrDefault();
if (file != null)
{
FileId = file.FileId;
- await SetImage();
}
}
- StateHasChanged();
+ await SetImage();
+ StateHasChanged();
}
}
From 2cefab1c644ae3638ee433c224866bda29437451 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 4 Aug 2025 13:09:37 -0400
Subject: [PATCH 14/53] resolve interactive page load
---
Oqtane.Client/UI/Routes.razor | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Oqtane.Client/UI/Routes.razor b/Oqtane.Client/UI/Routes.razor
index e029fd6d..9cc3b5cc 100644
--- a/Oqtane.Client/UI/Routes.razor
+++ b/Oqtane.Client/UI/Routes.razor
@@ -48,7 +48,7 @@
private bool _initialized = false;
private bool _installed = false;
- private string _display = "display: none;"; // prevents flash on initial interactive page load when using prerendering
+ private string _display = "display: none;"; // prevents flash on initial interactive page load
private PageState _pageState { get; set; }
@@ -86,10 +86,7 @@
if (firstRender)
{
_display = "";
- if (PageState != null && PageState.Site.Prerender)
- {
- StateHasChanged(); // required or else the UI will not refresh
- }
+ StateHasChanged();
}
}
From 7b36f8d122fe25780794cb88e2c16342b79257fd Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 4 Aug 2025 17:18:25 -0400
Subject: [PATCH 15/53] rolling back to SQLitePCLRaw.bundle_e_sqlite3 version
2.1.11
---
Oqtane.Server/Oqtane.Server.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj
index 69f4d601..a05b1a9d 100644
--- a/Oqtane.Server/Oqtane.Server.csproj
+++ b/Oqtane.Server/Oqtane.Server.csproj
@@ -45,7 +45,7 @@
-
+
From 39ae6a76cd6aad8efeb39692ad17edcf6b922574 Mon Sep 17 00:00:00 2001
From: Leigh Pointer
Date: Thu, 7 Aug 2025 08:09:34 +0200
Subject: [PATCH 16/53] Updated Project Refs 9.0.8
# SQLitePCLRaw.bundle_e_sqlite3 was not updated.
Oqtane Framework
Project Templates Module and Theme
MAUI solution
---
Oqtane.Client/Oqtane.Client.csproj | 8 ++++----
.../Oqtane.Database.PostgreSQL.csproj | 2 +-
.../Oqtane.Database.SqlServer.csproj | 2 +-
.../Oqtane.Database.Sqlite.csproj | 2 +-
Oqtane.Maui/Oqtane.Maui.csproj | 10 +++++-----
Oqtane.Server/Oqtane.Server.csproj | 14 +++++++-------
.../Client/[Owner].Module.[Module].Client.csproj | 10 +++++-----
.../Server/[Owner].Module.[Module].Server.csproj | 8 ++++----
.../Client/[Owner].Theme.[Theme].Client.csproj | 6 +++---
Oqtane.Shared/Oqtane.Shared.csproj | 8 ++++----
10 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj
index 79410dec..267c96a4 100644
--- a/Oqtane.Client/Oqtane.Client.csproj
+++ b/Oqtane.Client/Oqtane.Client.csproj
@@ -22,10 +22,10 @@
-
-
-
-
+
+
+
+
diff --git a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj
index b0a8c50d..601f62e2 100644
--- a/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj
+++ b/Oqtane.Database.PostgreSQL/Oqtane.Database.PostgreSQL.csproj
@@ -34,7 +34,7 @@
-
+
diff --git a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj
index 8a8bfd66..70bd3ac1 100644
--- a/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj
+++ b/Oqtane.Database.SqlServer/Oqtane.Database.SqlServer.csproj
@@ -33,7 +33,7 @@
-
+
diff --git a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj
index fb57225e..6ed046be 100644
--- a/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj
+++ b/Oqtane.Database.Sqlite/Oqtane.Database.Sqlite.csproj
@@ -33,7 +33,7 @@
-
+
diff --git a/Oqtane.Maui/Oqtane.Maui.csproj b/Oqtane.Maui/Oqtane.Maui.csproj
index 8e683de5..fdb4801c 100644
--- a/Oqtane.Maui/Oqtane.Maui.csproj
+++ b/Oqtane.Maui/Oqtane.Maui.csproj
@@ -67,11 +67,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj
index a05b1a9d..40d26e29 100644
--- a/Oqtane.Server/Oqtane.Server.csproj
+++ b/Oqtane.Server/Oqtane.Server.csproj
@@ -34,17 +34,17 @@
-
-
+
+
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
+
+
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 8dff70b0..501cec31 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
@@ -13,11 +13,11 @@
-
-
-
-
-
+
+
+
+
+
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 7d9645e0..28f27a31 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
@@ -19,10 +19,10 @@
-
-
-
-
+
+
+
+
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 f3a6fe45..99587a54 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
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/Oqtane.Shared/Oqtane.Shared.csproj b/Oqtane.Shared/Oqtane.Shared.csproj
index 5ebf7557..8cc49663 100644
--- a/Oqtane.Shared/Oqtane.Shared.csproj
+++ b/Oqtane.Shared/Oqtane.Shared.csproj
@@ -19,12 +19,12 @@
-
-
-
+
+
+
-
+
From b11a7a678ce509b957b55a27061b73a4b8e4cd9e Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 10:58:33 -0400
Subject: [PATCH 17/53] fix #5461 - handle MinDate and MaxDate
---
Oqtane.Client/Modules/ModuleBase.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Oqtane.Client/Modules/ModuleBase.cs b/Oqtane.Client/Modules/ModuleBase.cs
index 59721817..904a89da 100644
--- a/Oqtane.Client/Modules/ModuleBase.cs
+++ b/Oqtane.Client/Modules/ModuleBase.cs
@@ -504,8 +504,8 @@ namespace Oqtane.Modules
public DateTime? UtcToLocal(DateTime? datetime)
{
// Early return if input is null
- if (datetime == null)
- return null;
+ if (datetime == null || datetime.Value == DateTime.MinValue || datetime.Value == DateTime.MaxValue)
+ return datetime;
string timezoneId = null;
@@ -524,8 +524,8 @@ namespace Oqtane.Modules
public DateTime? LocalToUtc(DateTime? datetime)
{
// Early return if input is null
- if (datetime == null)
- return null;
+ if (datetime == null || datetime.Value == DateTime.MinValue || datetime.Value == DateTime.MaxValue)
+ return datetime;
string timezoneId = null;
From 30c869ff2af0a772ff76f9e847834dedff91c1c6 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 14:30:13 -0400
Subject: [PATCH 18/53] performance improvement to filter settings in database
---
Oqtane.Server/Repository/SettingRepository.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Oqtane.Server/Repository/SettingRepository.cs b/Oqtane.Server/Repository/SettingRepository.cs
index 0b25634a..16a33811 100644
--- a/Oqtane.Server/Repository/SettingRepository.cs
+++ b/Oqtane.Server/Repository/SettingRepository.cs
@@ -38,7 +38,15 @@ namespace Oqtane.Repository
public IEnumerable GetSettings(string entityName, int entityId)
{
- return GetSettings(entityName).Where(item => item.EntityId == entityId);
+ if (IsMaster(entityName))
+ {
+ return _master.Setting.Where(item => item.EntityName == entityName && item.EntityId == entityId).ToList();
+ }
+ else
+ {
+ using var db = _tenantContextFactory.CreateDbContext();
+ return db.Setting.Where(item => item.EntityName == entityName && item.EntityId == entityId).ToList();
+ }
}
public IEnumerable GetSettings(string entityName1, int entityId1, string entityName2, int entityId2)
From a37f07d20b56157dd6b084ec739ae14f3afd3abf Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 14:31:57 -0400
Subject: [PATCH 19/53] fix malformed bold tag
---
Oqtane.Client/Modules/Controls/AuditInfo.razor | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Oqtane.Client/Modules/Controls/AuditInfo.razor b/Oqtane.Client/Modules/Controls/AuditInfo.razor
index e2a025ec..c8e649fc 100644
--- a/Oqtane.Client/Modules/Controls/AuditInfo.razor
+++ b/Oqtane.Client/Modules/Controls/AuditInfo.razor
@@ -52,7 +52,7 @@
if (CreatedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(CreatedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(CreatedOn).Value.ToString(DateTimeFormat)}";
}
_text += "
";
@@ -69,7 +69,7 @@
if (ModifiedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(ModifiedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(ModifiedOn).Value.ToString(DateTimeFormat)}";
}
_text += "";
@@ -86,7 +86,7 @@
if (DeletedOn != null)
{
- _text += $" {Localizer["On"]} {UtcToLocal(DeletedOn).Value.ToString(DateTimeFormat)} b >";
+ _text += $" {Localizer["On"]} {UtcToLocal(DeletedOn).Value.ToString(DateTimeFormat)}";
}
_text += "";
From 3bd6767138c26325dd8b95b524f5859adf92d2df Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 14:42:24 -0400
Subject: [PATCH 20/53] only hosts should be allowed to view/edit SMTP settings
---
Oqtane.Client/Modules/Admin/Site/Index.razor | 66 +++++++++++---------
1 file changed, 36 insertions(+), 30 deletions(-)
diff --git a/Oqtane.Client/Modules/Admin/Site/Index.razor b/Oqtane.Client/Modules/Admin/Site/Index.razor
index baaedb1a..115f29a0 100644
--- a/Oqtane.Client/Modules/Admin/Site/Index.razor
+++ b/Oqtane.Client/Modules/Admin/Site/Index.razor
@@ -202,7 +202,7 @@
- @if (_smtpenabled == "True")
+ @if (_smtpenabled == "True" && UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
{
@@ -609,21 +609,24 @@
// SMTP
_smtpenabled = SettingService.GetSetting(settings, "SMTPEnabled", "False");
- _smtphost = SettingService.GetSetting(settings, "SMTPHost", string.Empty);
- _smtpport = SettingService.GetSetting(settings, "SMTPPort", string.Empty);
- _smtpssl = SettingService.GetSetting(settings, "SMTPSSL", "False");
- _smtpauthentication = SettingService.GetSetting(settings, "SMTPAuthentication", "Basic");
- _smtpusername = SettingService.GetSetting(settings, "SMTPUsername", string.Empty);
- _smtppassword = SettingService.GetSetting(settings, "SMTPPassword", string.Empty);
- _togglesmtppassword = SharedLocalizer["ShowPassword"];
- _smtpauthority = SettingService.GetSetting(settings, "SMTPAuthority", string.Empty);
- _smtpclientid = SettingService.GetSetting(settings, "SMTPClientId", string.Empty);
- _smtpclientsecret = SettingService.GetSetting(settings, "SMTPClientSecret", string.Empty);
- _togglesmtpclientsecret = SharedLocalizer["ShowPassword"];
- _smtpscopes = SettingService.GetSetting(settings, "SMTPScopes", string.Empty);
- _smtpsender = SettingService.GetSetting(settings, "SMTPSender", string.Empty);
- _smtprelay = SettingService.GetSetting(settings, "SMTPRelay", "False");
- _retention = int.Parse(SettingService.GetSetting(settings, "NotificationRetention", "30"));
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
+ {
+ _smtphost = SettingService.GetSetting(settings, "SMTPHost", string.Empty);
+ _smtpport = SettingService.GetSetting(settings, "SMTPPort", string.Empty);
+ _smtpssl = SettingService.GetSetting(settings, "SMTPSSL", "False");
+ _smtpauthentication = SettingService.GetSetting(settings, "SMTPAuthentication", "Basic");
+ _smtpusername = SettingService.GetSetting(settings, "SMTPUsername", string.Empty);
+ _smtppassword = SettingService.GetSetting(settings, "SMTPPassword", string.Empty);
+ _togglesmtppassword = SharedLocalizer["ShowPassword"];
+ _smtpauthority = SettingService.GetSetting(settings, "SMTPAuthority", string.Empty);
+ _smtpclientid = SettingService.GetSetting(settings, "SMTPClientId", string.Empty);
+ _smtpclientsecret = SettingService.GetSetting(settings, "SMTPClientSecret", string.Empty);
+ _togglesmtpclientsecret = SharedLocalizer["ShowPassword"];
+ _smtpscopes = SettingService.GetSetting(settings, "SMTPScopes", string.Empty);
+ _smtpsender = SettingService.GetSetting(settings, "SMTPSender", string.Empty);
+ _smtprelay = SettingService.GetSetting(settings, "SMTPRelay", "False");
+ _retention = int.Parse(SettingService.GetSetting(settings, "NotificationRetention", "30"));
+ }
// PWA
_pwaisenabled = site.PwaIsEnabled.ToString();
@@ -800,21 +803,23 @@
// SMTP
var settings = await SettingService.GetSiteSettingsAsync(site.SiteId);
- settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
- settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
- settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
- settings = SettingService.SetSetting(settings, "SMTPAuthentication", _smtpauthentication, true);
- settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
- settings = SettingService.SetSetting(settings, "SMTPPassword", _smtppassword, true);
- settings = SettingService.SetSetting(settings, "SMTPAuthority", _smtpauthority, true);
- settings = SettingService.SetSetting(settings, "SMTPClientId", _smtpclientid, true);
- settings = SettingService.SetSetting(settings, "SMTPClientSecret", _smtpclientsecret, true);
- settings = SettingService.SetSetting(settings, "SMTPScopes", _smtpscopes, true);
- settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
- settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
settings = SettingService.SetSetting(settings, "SMTPEnabled", _smtpenabled, true);
- settings = SettingService.SetSetting(settings, "SiteGuid", _siteguid, true);
- settings = SettingService.SetSetting(settings, "NotificationRetention", _retention.ToString(), true);
+ if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
+ {
+ settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
+ settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
+ settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
+ settings = SettingService.SetSetting(settings, "SMTPAuthentication", _smtpauthentication, true);
+ settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
+ settings = SettingService.SetSetting(settings, "SMTPPassword", _smtppassword, true);
+ settings = SettingService.SetSetting(settings, "SMTPAuthority", _smtpauthority, true);
+ settings = SettingService.SetSetting(settings, "SMTPClientId", _smtpclientid, true);
+ settings = SettingService.SetSetting(settings, "SMTPClientSecret", _smtpclientsecret, true);
+ settings = SettingService.SetSetting(settings, "SMTPScopes", _smtpscopes, true);
+ settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
+ settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
+ settings = SettingService.SetSetting(settings, "NotificationRetention", _retention.ToString(), true);
+ }
//cookie consent
settings = SettingService.SetSetting(settings, "CookieConsent", _cookieconsent);
@@ -822,6 +827,7 @@
// functionality
settings = SettingService.SetSetting(settings, "TextEditor", _textEditor);
+ settings = SettingService.SetSetting(settings, "SiteGuid", _siteguid, true);
await SettingService.UpdateSiteSettingsAsync(settings, site.SiteId);
await logger.LogInformation("Site Settings Saved {Site}", site);
From 4cf1b5c0e7df4af0f6ab08f58afa8259e515fcfb Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Thu, 7 Aug 2025 15:07:33 -0400
Subject: [PATCH 21/53] add missing delete setting API method
---
.../Controllers/SettingController.cs | 33 +++++++++++++++----
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/Oqtane.Server/Controllers/SettingController.cs b/Oqtane.Server/Controllers/SettingController.cs
index b2db2def..1c42ab7d 100644
--- a/Oqtane.Server/Controllers/SettingController.cs
+++ b/Oqtane.Server/Controllers/SettingController.cs
@@ -89,7 +89,7 @@ namespace Oqtane.Controllers
// suppress unauthorized visitor logging as it is usually caused by clients that do not support cookies or private browsing sessions
if (entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Settings {EntityName} {EntityId}", entityName, entityId);
+ _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Settings For EntityName {EntityName} And EntityId {EntityId}", entityName, entityId);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
@@ -101,7 +101,7 @@ namespace Oqtane.Controllers
public Setting Get(int id, string entityName)
{
Setting setting = _settings.GetSetting(entityName, id);
- if (IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.View))
+ if (setting != null && IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.View))
{
if (FilterPrivate(entityName, id) && setting.IsPrivate)
{
@@ -113,7 +113,7 @@ namespace Oqtane.Controllers
{
if (setting != null && entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access Setting {EntityName} {SettingId}", entityName, id);
+ _logger.Log(LogLevel.Error, this, LogFunction.Read, "User Not Authorized To Access SettingId {SettingId} For EntityName {EntityName} ", id, entityName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
else
@@ -201,12 +201,12 @@ namespace Oqtane.Controllers
}
else
{
- _logger.Log(LogLevel.Error, this, LogFunction.Update, "User Not Authorized To Add Or Update Setting {EntityName} {EntityId} {SettingName}", entityName, entityId, settingName);
+ _logger.Log(LogLevel.Error, this, LogFunction.Update, "User Not Authorized To Add Or Update Setting For EntityName {EntityName} EntityId {EntityId} SettingName {SettingName}", entityName, entityId, settingName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
- // DELETE api//site/1/settingname
+ // DELETE api//site/1/settingname/settingid
[HttpDelete("{entityName}/{entityId}/{settingName}")]
public void Delete(string entityName, int entityId, string settingName)
{
@@ -221,7 +221,28 @@ namespace Oqtane.Controllers
{
if (entityName != EntityNames.Visitor)
{
- _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For Entity {EntityName} Id {EntityId} Name {SettingName}", entityName, entityId, settingName);
+ _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For EntityName {EntityName} EntityId {EntityId} SettingName {SettingName}", entityName, entityId, settingName);
+ HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
+ }
+ }
+ }
+
+ // DELETE api//1/site
+ [HttpDelete("{id}/{entityName}")]
+ public void Delete(int id, string entityName)
+ {
+ Setting setting = _settings.GetSetting(entityName, id);
+ if (setting != null && IsAuthorized(setting.EntityName, setting.EntityId, PermissionNames.Edit))
+ {
+ _settings.DeleteSetting(setting.EntityName, setting.SettingId);
+ AddSyncEvent(setting.EntityName, setting.EntityId, setting.SettingId, SyncEventActions.Delete);
+ _logger.Log(LogLevel.Information, this, LogFunction.Delete, "Setting Deleted {Setting}", setting);
+ }
+ else
+ {
+ if (entityName != EntityNames.Visitor)
+ {
+ _logger.Log(LogLevel.Error, this, LogFunction.Delete, "Setting Does Not Exist Or User Not Authorized To Delete Setting For SettingId {SettingId} For EntityName {EntityName} ", id, entityName);
HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
}
}
From d7eb0dc50999d2eefcf54aae3727d8c86151a120 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:22:22 -0400
Subject: [PATCH 22/53] fix issue with Admin Site Template
---
.../SiteTemplates/AdminSiteTemplate.cs | 68 +++++++++----------
1 file changed, 32 insertions(+), 36 deletions(-)
diff --git a/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs b/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
index ddd1e784..730b0d87 100644
--- a/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
+++ b/Oqtane.Server/Infrastructure/SiteTemplates/AdminSiteTemplate.cs
@@ -579,6 +579,34 @@ namespace Oqtane.Infrastructure.SiteTemplates
}
}
});
+ pageTemplates.Add(new PageTemplate
+ {
+ Name = "Language Management",
+ Parent = "Admin",
+ Order = 21,
+ Path = "admin/languages",
+ Icon = Icons.Text,
+ IsNavigation = false,
+ IsPersonalizable = false,
+ PermissionList = new List
+ {
+ new Permission(PermissionNames.View, RoleNames.Admin, true),
+ new Permission(PermissionNames.Edit, RoleNames.Admin, true)
+ },
+ PageTemplateModules = new List
+ {
+ new PageTemplateModule
+ {
+ ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = "Language Management", Pane = PaneNames.Default,
+ PermissionList = new List
+ {
+ new Permission(PermissionNames.View, RoleNames.Admin, true),
+ new Permission(PermissionNames.Edit, RoleNames.Admin, true)
+ },
+ Content = ""
+ }
+ }
+ });
// host pages (order starts at 51)
pageTemplates.Add(new PageTemplate
@@ -694,42 +722,10 @@ namespace Oqtane.Infrastructure.SiteTemplates
}
});
pageTemplates.Add(new PageTemplate
- {
- Name = "Language Management",
- Parent = "Admin",
- Order = 59,
- Path = "admin/languages",
- Icon = Icons.Text,
- IsNavigation = false,
- IsPersonalizable = false,
- PermissionList = new List
- {
- new Permission(PermissionNames.View, RoleNames.Host, true),
- new Permission(PermissionNames.Edit, RoleNames.Host, true),
- new Permission(PermissionNames.View, RoleNames.Admin, true),
- new Permission(PermissionNames.Edit, RoleNames.Admin, true)
- },
- PageTemplateModules = new List
- {
- new PageTemplateModule
- {
- ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = "Language Management", Pane = PaneNames.Default,
- PermissionList = new List
- {
- new Permission(PermissionNames.View, RoleNames.Host, true),
- new Permission(PermissionNames.Edit, RoleNames.Host, true),
- new Permission(PermissionNames.View, RoleNames.Admin, true),
- new Permission(PermissionNames.Edit, RoleNames.Admin, true)
- },
- Content = ""
- }
- }
- });
- pageTemplates.Add(new PageTemplate
{
Name = "Scheduled Jobs",
Parent = "Admin",
- Order = 61,
+ Order = 59,
Path = "admin/jobs",
Icon = Icons.Timer,
IsNavigation = false,
@@ -757,7 +753,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "Sql Management",
Parent = "Admin",
- Order = 63,
+ Order = 61,
Path = "admin/sql",
Icon = Icons.Spreadsheet,
IsNavigation = false,
@@ -785,7 +781,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "System Info",
Parent = "Admin",
- Order = 65,
+ Order = 63,
Path = "admin/system",
Icon = Icons.MedicalCross,
IsNavigation = false,
@@ -813,7 +809,7 @@ namespace Oqtane.Infrastructure.SiteTemplates
{
Name = "System Update",
Parent = "Admin",
- Order = 67,
+ Order = 65,
Path = "admin/update",
Icon = Icons.Aperture,
IsNavigation = false,
From b3f6194fda5f506cc6669168a07a2f785918ff90 Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:36:09 -0400
Subject: [PATCH 23/53] consolidate interface and implementation classes
---
Oqtane.Server/Repository/AliasRepository.cs | 11 ++++++++
.../IDBContextDependencies.cs | 0
Oqtane.Server/Repository/FileRepository.cs | 16 +++++++++++-
Oqtane.Server/Repository/FolderRepository.cs | 14 ++++++++++-
.../Repository/Interfaces/IAliasRepository.cs | 16 ------------
.../Repository/Interfaces/IFileRepository.cs | 20 ---------------
.../Interfaces/IFolderRepository.cs | 18 -------------
.../Interfaces/IJobLogRepository.cs | 15 -----------
.../Repository/Interfaces/IJobRepository.cs | 15 -----------
.../Interfaces/ILanguageRepository.cs | 18 -------------
.../Repository/Interfaces/ILogRepository.cs | 13 ----------
.../Interfaces/IModuleDefinitionRepository.cs | 15 -----------
.../Interfaces/IModuleRepository.cs | 17 -------------
.../Interfaces/INotificationRepository.cs | 18 -------------
.../Interfaces/IPageModuleRepository.cs | 16 ------------
.../Repository/Interfaces/IPageRepository.cs | 16 ------------
.../Interfaces/IPermissionRepository.cs | 21 ----------------
.../Interfaces/IProfileRepository.cs | 15 -----------
.../Repository/Interfaces/IRoleRepository.cs | 16 ------------
.../Interfaces/ISearchContentRepository.cs | 24 ------------------
.../Interfaces/ISettingRepository.cs | 21 ----------------
.../Repository/Interfaces/ISiteRepository.cs | 19 --------------
.../Interfaces/ISiteTemplateRepository.cs | 10 --------
.../Repository/Interfaces/ISqlRepository.cs | 25 -------------------
.../Interfaces/ITenantRepository.cs | 14 -----------
.../Repository/Interfaces/ITenantResolver.cs | 11 --------
.../Repository/Interfaces/IThemeRepository.cs | 14 -----------
.../Interfaces/IUrlMappingRepository.cs | 18 -------------
.../Repository/Interfaces/IUserRepository.cs | 17 -------------
.../Interfaces/IUserRoleRepository.cs | 20 ---------------
.../Interfaces/IVisitorRepository.cs | 17 -------------
Oqtane.Server/Repository/JobLogRepository.cs | 10 ++++++++
Oqtane.Server/Repository/JobRepository.cs | 10 ++++++++
.../Repository/LanguageRepository.cs | 9 +++++++
Oqtane.Server/Repository/LogRepository.cs | 8 ++++++
.../Repository/ModuleDefinitionRepository.cs | 10 ++++++++
Oqtane.Server/Repository/ModuleRepository.cs | 13 +++++++++-
.../Repository/NotificationRepository.cs | 13 ++++++++++
.../Repository/PageModuleRepository.cs | 13 ++++++++--
Oqtane.Server/Repository/PageRepository.cs | 12 ++++++++-
.../Repository/PermissionRepository.cs | 14 +++++++++++
Oqtane.Server/Repository/ProfileRepository.cs | 9 +++++++
Oqtane.Server/Repository/RoleRepository.cs | 13 ++++++++--
.../Repository/SearchContentRepository.cs | 20 ++++++++++++---
Oqtane.Server/Repository/SettingRepository.cs | 15 +++++++++++
Oqtane.Server/Repository/SiteRepository.cs | 14 ++++++++++-
.../Repository/SiteTemplateRepository.cs | 5 ++++
Oqtane.Server/Repository/SqlRepository.cs | 19 ++++++++++++++
Oqtane.Server/Repository/TenantRepository.cs | 8 ++++++
Oqtane.Server/Repository/TenantResolver.cs | 6 +++++
Oqtane.Server/Repository/ThemeRepository.cs | 10 +++++++-
.../Repository/UrlMappingRepository.cs | 12 +++++++++
Oqtane.Server/Repository/UserRepository.cs | 13 +++++++++-
.../Repository/UserRoleRepository.cs | 15 +++++++++++
Oqtane.Server/Repository/VisitorRepository.cs | 11 ++++++++
55 files changed, 309 insertions(+), 473 deletions(-)
rename Oqtane.Server/Repository/{Interfaces => Context}/IDBContextDependencies.cs (100%)
delete mode 100644 Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IFileRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IJobRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ILogRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPageRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUserRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
delete mode 100644 Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
diff --git a/Oqtane.Server/Repository/AliasRepository.cs b/Oqtane.Server/Repository/AliasRepository.cs
index e7dbd1c6..38b9925a 100644
--- a/Oqtane.Server/Repository/AliasRepository.cs
+++ b/Oqtane.Server/Repository/AliasRepository.cs
@@ -8,6 +8,17 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IAliasRepository
+ {
+ IEnumerable GetAliases();
+ Alias AddAlias(Alias alias);
+ Alias UpdateAlias(Alias alias);
+ Alias GetAlias(int aliasId);
+ Alias GetAlias(int aliasId, bool tracking);
+ Alias GetAlias(string url);
+ void DeleteAlias(int aliasId);
+ }
+
public class AliasRepository : IAliasRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/Interfaces/IDBContextDependencies.cs b/Oqtane.Server/Repository/Context/IDBContextDependencies.cs
similarity index 100%
rename from Oqtane.Server/Repository/Interfaces/IDBContextDependencies.cs
rename to Oqtane.Server/Repository/Context/IDBContextDependencies.cs
diff --git a/Oqtane.Server/Repository/FileRepository.cs b/Oqtane.Server/Repository/FileRepository.cs
index fedbdc6e..def51519 100644
--- a/Oqtane.Server/Repository/FileRepository.cs
+++ b/Oqtane.Server/Repository/FileRepository.cs
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
@@ -10,6 +9,21 @@ using File = Oqtane.Models.File;
namespace Oqtane.Repository
{
+ public interface IFileRepository
+ {
+ IEnumerable GetFiles(int folderId);
+ IEnumerable GetFiles(int folderId, bool tracking);
+ File AddFile(File file);
+ File UpdateFile(File file);
+ File GetFile(int fileId);
+ File GetFile(int fileId, bool tracking);
+ File GetFile(int folderId, string fileName);
+ File GetFile(int siteId, string folderPath, string fileName);
+ void DeleteFile(int fileId);
+ string GetFilePath(int fileId);
+ string GetFilePath(File file);
+ }
+
public class FileRepository : IFileRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/FolderRepository.cs b/Oqtane.Server/Repository/FolderRepository.cs
index c4dfb8ed..d00a6a7c 100644
--- a/Oqtane.Server/Repository/FolderRepository.cs
+++ b/Oqtane.Server/Repository/FolderRepository.cs
@@ -2,13 +2,25 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IFolderRepository
+ {
+ IEnumerable GetFolders(int siteId);
+ Folder AddFolder(Folder folder);
+ Folder UpdateFolder(Folder folder);
+ Folder GetFolder(int folderId);
+ Folder GetFolder(int folderId, bool tracking);
+ Folder GetFolder(int siteId, string path);
+ void DeleteFolder(int folderId);
+ string GetFolderPath(int folderId);
+ string GetFolderPath(Folder folder);
+ }
+
public class FolderRepository : IFolderRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs b/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
deleted file mode 100644
index 81a42d68..00000000
--- a/Oqtane.Server/Repository/Interfaces/IAliasRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IAliasRepository
- {
- IEnumerable GetAliases();
- Alias AddAlias(Alias alias);
- Alias UpdateAlias(Alias alias);
- Alias GetAlias(int aliasId);
- Alias GetAlias(int aliasId, bool tracking);
- Alias GetAlias(string url);
- void DeleteAlias(int aliasId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IFileRepository.cs b/Oqtane.Server/Repository/Interfaces/IFileRepository.cs
deleted file mode 100644
index 214b03d8..00000000
--- a/Oqtane.Server/Repository/Interfaces/IFileRepository.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IFileRepository
- {
- IEnumerable GetFiles(int folderId);
- IEnumerable GetFiles(int folderId, bool tracking);
- File AddFile(File file);
- File UpdateFile(File file);
- File GetFile(int fileId);
- File GetFile(int fileId, bool tracking);
- File GetFile(int folderId, string fileName);
- File GetFile(int siteId, string folderPath, string fileName);
- void DeleteFile(int fileId);
- string GetFilePath(int fileId);
- string GetFilePath(File file);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs b/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
deleted file mode 100644
index dba914a7..00000000
--- a/Oqtane.Server/Repository/Interfaces/IFolderRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IFolderRepository
- {
- IEnumerable GetFolders(int siteId);
- Folder AddFolder(Folder folder);
- Folder UpdateFolder(Folder folder);
- Folder GetFolder(int folderId);
- Folder GetFolder(int folderId, bool tracking);
- Folder GetFolder(int siteId, string path);
- void DeleteFolder(int folderId);
- string GetFolderPath(int folderId);
- string GetFolderPath(Folder folder);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs b/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
deleted file mode 100644
index 2c092e7a..00000000
--- a/Oqtane.Server/Repository/Interfaces/IJobLogRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IJobLogRepository
- {
- IEnumerable GetJobLogs();
- IEnumerable GetJobLogs(int jobId);
- JobLog AddJobLog(JobLog jobLog);
- JobLog UpdateJobLog(JobLog jobLog);
- JobLog GetJobLog(int jobLogId);
- void DeleteJobLog(int jobLogId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IJobRepository.cs b/Oqtane.Server/Repository/Interfaces/IJobRepository.cs
deleted file mode 100644
index e45b0231..00000000
--- a/Oqtane.Server/Repository/Interfaces/IJobRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IJobRepository
- {
- IEnumerable GetJobs();
- Job AddJob(Job job);
- Job UpdateJob(Job job);
- Job GetJob(int jobId);
- Job GetJob(int jobId, bool tracking);
- void DeleteJob(int jobId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs b/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
deleted file mode 100644
index 14619121..00000000
--- a/Oqtane.Server/Repository/Interfaces/ILanguageRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ILanguageRepository
- {
- IEnumerable GetLanguages(int siteId);
-
- Language AddLanguage(Language language);
-
- void UpdateLanguage(Language language);
-
- Language GetLanguage(int languageId);
-
- void DeleteLanguage(int languageId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ILogRepository.cs b/Oqtane.Server/Repository/Interfaces/ILogRepository.cs
deleted file mode 100644
index 918785f2..00000000
--- a/Oqtane.Server/Repository/Interfaces/ILogRepository.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ILogRepository
- {
- IEnumerable GetLogs(int siteId, string level, string function, int rows);
- Log GetLog(int logId);
- void AddLog(Log log);
- int DeleteLogs(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs b/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
deleted file mode 100644
index eb4f45d9..00000000
--- a/Oqtane.Server/Repository/Interfaces/IModuleDefinitionRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IModuleDefinitionRepository
- {
- IEnumerable GetModuleDefinitions();
- IEnumerable GetModuleDefinitions(int siteId);
- ModuleDefinition GetModuleDefinition(int moduleDefinitionId, int siteId);
- void UpdateModuleDefinition(ModuleDefinition moduleDefinition);
- void DeleteModuleDefinition(int moduleDefinitionId);
- ModuleDefinition FilterModuleDefinition(ModuleDefinition moduleDefinition);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs b/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
deleted file mode 100644
index 08923ecd..00000000
--- a/Oqtane.Server/Repository/Interfaces/IModuleRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IModuleRepository
- {
- IEnumerable GetModules(int siteId);
- Module AddModule(Module module);
- Module UpdateModule(Module module);
- Module GetModule(int moduleId);
- Module GetModule(int moduleId, bool tracking);
- void DeleteModule(int moduleId);
- string ExportModule(int moduleId);
- bool ImportModule(int moduleId, string content);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs b/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
deleted file mode 100644
index 948d7b53..00000000
--- a/Oqtane.Server/Repository/Interfaces/INotificationRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface INotificationRepository
- {
- IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId);
- IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId, int count, bool isRead);
- int GetNotificationCount(int siteId, int fromUserId, int toUserId, bool isRead);
- Notification AddNotification(Notification notification);
- Notification UpdateNotification(Notification notification);
- Notification GetNotification(int notificationId);
- Notification GetNotification(int notificationId, bool tracking);
- void DeleteNotification(int notificationId);
- int DeleteNotifications(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs b/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
deleted file mode 100644
index a3ac66e5..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPageModuleRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IPageModuleRepository
- {
- IEnumerable GetPageModules(int siteId);
- PageModule AddPageModule(PageModule pageModule);
- PageModule UpdatePageModule(PageModule pageModule);
- PageModule GetPageModule(int pageModuleId);
- PageModule GetPageModule(int pageModuleId, bool tracking);
- PageModule GetPageModule(int pageId, int moduleId);
- void DeletePageModule(int pageModuleId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPageRepository.cs b/Oqtane.Server/Repository/Interfaces/IPageRepository.cs
deleted file mode 100644
index 12caca4c..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPageRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IPageRepository
- {
- IEnumerable GetPages(int siteId);
- Page AddPage(Page page);
- Page UpdatePage(Page page);
- Page GetPage(int pageId);
- Page GetPage(int pageId, bool tracking);
- Page GetPage(string path, int siteId);
- void DeletePage(int pageId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs b/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
deleted file mode 100644
index a3dc7358..00000000
--- a/Oqtane.Server/Repository/Interfaces/IPermissionRepository.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections.Generic;
-using System.Security.Policy;
-using Oqtane.Models;
-
-// ReSharper disable once CheckNamespace
-namespace Oqtane.Repository
-{
- public interface IPermissionRepository
-{
- IEnumerable GetPermissions(int siteId, string entityName);
- IEnumerable GetPermissions(int siteId, string entityName, string permissionName);
- IEnumerable GetPermissions(int siteId, string entityName, int entityId);
- IEnumerable GetPermissions(int siteId, string entityName, int entityId, string permissionName);
- Permission AddPermission(Permission permission);
- Permission UpdatePermission(Permission permission);
- void UpdatePermissions(int siteId, string entityName, int entityId, List permissions);
- Permission GetPermission(int permissionId);
- void DeletePermission(int permissionId);
- void DeletePermissions(int siteId, string entityName, int entityId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs b/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
deleted file mode 100644
index 95405c96..00000000
--- a/Oqtane.Server/Repository/Interfaces/IProfileRepository.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IProfileRepository
- {
- IEnumerable GetProfiles(int siteId);
- Profile AddProfile(Profile profile);
- Profile UpdateProfile(Profile profile);
- Profile GetProfile(int profileId);
- Profile GetProfile(int profileId, bool tracking);
- void DeleteProfile(int profileId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs b/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
deleted file mode 100644
index 1b2ea0e4..00000000
--- a/Oqtane.Server/Repository/Interfaces/IRoleRepository.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IRoleRepository
- {
- IEnumerable GetRoles(int siteId);
- IEnumerable GetRoles(int siteId, bool includeGlobalRoles);
- Role AddRole(Role role);
- Role UpdateRole(Role role);
- Role GetRole(int roleId);
- Role GetRole(int roleId, bool tracking);
- void DeleteRole(int roleId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs b/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
deleted file mode 100644
index 022c8012..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISearchContentRepository.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISearchContentRepository
- {
- Task> GetSearchContentsAsync(SearchQuery searchQuery);
- SearchContent AddSearchContent(SearchContent searchContent);
- void DeleteSearchContent(int searchContentId);
- void DeleteSearchContent(string entityName, string entryId);
- void DeleteSearchContent(string uniqueKey);
- void DeleteAllSearchContent(int siteId);
-
- SearchWord GetSearchWord(string word);
- SearchWord AddSearchWord(SearchWord searchWord);
-
- IEnumerable GetSearchContentWords(int searchContentId);
- SearchContentWord AddSearchContentWord(SearchContentWord searchContentWord);
- SearchContentWord UpdateSearchContentWord(SearchContentWord searchContentWord);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs b/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
deleted file mode 100644
index 7315f633..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISettingRepository.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-using Oqtane.Shared;
-
-namespace Oqtane.Repository
-{
- public interface ISettingRepository
- {
- IEnumerable GetSettings(string entityName);
- IEnumerable GetSettings(string entityName, int entityId);
- IEnumerable GetSettings(string entityName1, int entityId1, string entityName2, int entityId2);
- Setting AddSetting(Setting setting);
- Setting UpdateSetting(Setting setting);
- Setting GetSetting(string entityName, int settingId);
- Setting GetSetting(string entityName, int entityId, string settingName);
- void DeleteSetting(string entityName, int settingId);
- void DeleteSettings(string entityName, int entityId);
- string GetSettingValue(IEnumerable settings, string settingName, string defaultValue);
- string GetSettingValue(string entityName, int entityId, string settingName, string defaultValue);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs b/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
deleted file mode 100644
index 3ef66893..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISiteRepository.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISiteRepository
- {
- IEnumerable GetSites();
- Site AddSite(Site site);
- Site UpdateSite(Site site);
- Site GetSite(int siteId);
- Site GetSite(int siteId, bool tracking);
- void DeleteSite(int siteId);
-
- void InitializeSite(Alias alias);
- void CreatePages(Site site, List pageTemplates, Alias alias);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs b/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
deleted file mode 100644
index 659226ff..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISiteTemplateRepository.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISiteTemplateRepository
- {
- IEnumerable GetSiteTemplates();
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs b/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
deleted file mode 100644
index d4d87201..00000000
--- a/Oqtane.Server/Repository/Interfaces/ISqlRepository.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Data;
-using System.Reflection;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ISqlRepository
- {
- void ExecuteScript(Tenant tenant, string script);
-
- bool ExecuteScript(string connectionString, string databaseType, Assembly assembly, string filename);
-
- bool ExecuteScript(Tenant tenant, Assembly assembly, string filename);
-
- int ExecuteNonQuery(Tenant tenant, string query);
-
- int ExecuteNonQuery(string connectionString, string databaseType, string query);
-
- IDataReader ExecuteReader(Tenant tenant, string query);
-
- IDataReader ExecuteReader(string DBType, string DBConnectionString, string query);
-
- string GetScriptFromAssembly(Assembly assembly, string fileName);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs b/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
deleted file mode 100644
index 5993eb63..00000000
--- a/Oqtane.Server/Repository/Interfaces/ITenantRepository.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface ITenantRepository
- {
- IEnumerable GetTenants();
- Tenant AddTenant(Tenant tenant);
- Tenant UpdateTenant(Tenant tenant);
- Tenant GetTenant(int tenantId);
- void DeleteTenant(int tenantId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs b/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
deleted file mode 100644
index bc3a48eb..00000000
--- a/Oqtane.Server/Repository/Interfaces/ITenantResolver.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- // class deprecated and replaced by ITenantManager
- public interface ITenantResolver
- {
- Alias GetAlias();
- Tenant GetTenant();
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs b/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
deleted file mode 100644
index b8d98aee..00000000
--- a/Oqtane.Server/Repository/Interfaces/IThemeRepository.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IThemeRepository
- {
- IEnumerable GetThemes();
- Theme GetTheme(int themeId, int siteId);
- void UpdateTheme(Theme theme);
- void DeleteTheme(int themeId);
- List FilterThemes(List themes);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs b/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
deleted file mode 100644
index ca056484..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUrlMappingRepository.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUrlMappingRepository
- {
- IEnumerable GetUrlMappings(int siteId, bool isMapped);
- UrlMapping AddUrlMapping(UrlMapping urlMapping);
- UrlMapping UpdateUrlMapping(UrlMapping urlMapping);
- UrlMapping GetUrlMapping(int urlMappingId);
- UrlMapping GetUrlMapping(int urlMappingId, bool tracking);
- UrlMapping GetUrlMapping(int siteId, string url);
- void DeleteUrlMapping(int urlMappingId);
- int DeleteUrlMappings(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUserRepository.cs b/Oqtane.Server/Repository/Interfaces/IUserRepository.cs
deleted file mode 100644
index 89ed4204..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUserRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUserRepository
- {
- IEnumerable GetUsers();
- User AddUser(User user);
- User UpdateUser(User user);
- User GetUser(int userId);
- User GetUser(int userId, bool tracking);
- User GetUser(string username);
- User GetUser(string username, string email);
- void DeleteUser(int userId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs b/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
deleted file mode 100644
index 7db22b4e..00000000
--- a/Oqtane.Server/Repository/Interfaces/IUserRoleRepository.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IUserRoleRepository
- {
- IEnumerable GetUserRoles(int siteId);
- IEnumerable GetUserRoles(int userId, int siteId);
- IEnumerable GetUserRoles(string roleName, int siteId);
- UserRole AddUserRole(UserRole userRole);
- UserRole UpdateUserRole(UserRole userRole);
- UserRole GetUserRole(int userRoleId);
- UserRole GetUserRole(int userRoleId, bool tracking);
- UserRole GetUserRole(int userId, int roleId);
- UserRole GetUserRole(int userId, int roleId, bool tracking);
- void DeleteUserRole(int userRoleId);
- void DeleteUserRoles(int userId);
- }
-}
diff --git a/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs b/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
deleted file mode 100644
index 9100e0b8..00000000
--- a/Oqtane.Server/Repository/Interfaces/IVisitorRepository.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Oqtane.Models;
-
-namespace Oqtane.Repository
-{
- public interface IVisitorRepository
- {
- IEnumerable GetVisitors(int siteId, DateTime fromDate);
- Visitor AddVisitor(Visitor visitor);
- Visitor UpdateVisitor(Visitor visitor);
- Visitor GetVisitor(int visitorId);
- Visitor GetVisitor(int siteId, string IPAddress);
- void DeleteVisitor(int visitorId);
- int DeleteVisitors(int siteId, int age);
- }
-}
diff --git a/Oqtane.Server/Repository/JobLogRepository.cs b/Oqtane.Server/Repository/JobLogRepository.cs
index ee234c27..523ac356 100644
--- a/Oqtane.Server/Repository/JobLogRepository.cs
+++ b/Oqtane.Server/Repository/JobLogRepository.cs
@@ -5,6 +5,16 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IJobLogRepository
+ {
+ IEnumerable GetJobLogs();
+ IEnumerable GetJobLogs(int jobId);
+ JobLog AddJobLog(JobLog jobLog);
+ JobLog UpdateJobLog(JobLog jobLog);
+ JobLog GetJobLog(int jobLogId);
+ void DeleteJobLog(int jobLogId);
+ }
+
public class JobLogRepository : IJobLogRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/JobRepository.cs b/Oqtane.Server/Repository/JobRepository.cs
index 6d56c5c3..823bdcc8 100644
--- a/Oqtane.Server/Repository/JobRepository.cs
+++ b/Oqtane.Server/Repository/JobRepository.cs
@@ -7,6 +7,16 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IJobRepository
+ {
+ IEnumerable GetJobs();
+ Job AddJob(Job job);
+ Job UpdateJob(Job job);
+ Job GetJob(int jobId);
+ Job GetJob(int jobId, bool tracking);
+ void DeleteJob(int jobId);
+ }
+
public class JobRepository : IJobRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/LanguageRepository.cs b/Oqtane.Server/Repository/LanguageRepository.cs
index f31a61eb..f074c9a1 100644
--- a/Oqtane.Server/Repository/LanguageRepository.cs
+++ b/Oqtane.Server/Repository/LanguageRepository.cs
@@ -5,6 +5,15 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ILanguageRepository
+ {
+ IEnumerable GetLanguages(int siteId);
+ Language AddLanguage(Language language);
+ void UpdateLanguage(Language language);
+ Language GetLanguage(int languageId);
+ void DeleteLanguage(int languageId);
+ }
+
public class LanguageRepository : ILanguageRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/LogRepository.cs b/Oqtane.Server/Repository/LogRepository.cs
index 12f43a21..f41e0d97 100644
--- a/Oqtane.Server/Repository/LogRepository.cs
+++ b/Oqtane.Server/Repository/LogRepository.cs
@@ -6,6 +6,14 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ILogRepository
+ {
+ IEnumerable GetLogs(int siteId, string level, string function, int rows);
+ Log GetLog(int logId);
+ void AddLog(Log log);
+ int DeleteLogs(int siteId, int age);
+ }
+
public class LogRepository : ILogRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
index 204578e4..b073f5d5 100644
--- a/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
+++ b/Oqtane.Server/Repository/ModuleDefinitionRepository.cs
@@ -13,6 +13,16 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IModuleDefinitionRepository
+ {
+ IEnumerable GetModuleDefinitions();
+ IEnumerable GetModuleDefinitions(int siteId);
+ ModuleDefinition GetModuleDefinition(int moduleDefinitionId, int siteId);
+ void UpdateModuleDefinition(ModuleDefinition moduleDefinition);
+ void DeleteModuleDefinition(int moduleDefinitionId);
+ ModuleDefinition FilterModuleDefinition(ModuleDefinition moduleDefinition);
+ }
+
public class ModuleDefinitionRepository : IModuleDefinitionRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/ModuleRepository.cs b/Oqtane.Server/Repository/ModuleRepository.cs
index 5885ae9c..18cbd05f 100644
--- a/Oqtane.Server/Repository/ModuleRepository.cs
+++ b/Oqtane.Server/Repository/ModuleRepository.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Text.Json;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Modules;
using Oqtane.Shared;
@@ -12,6 +11,18 @@ using Module = Oqtane.Models.Module;
namespace Oqtane.Repository
{
+ public interface IModuleRepository
+ {
+ IEnumerable GetModules(int siteId);
+ Module AddModule(Module module);
+ Module UpdateModule(Module module);
+ Module GetModule(int moduleId);
+ Module GetModule(int moduleId, bool tracking);
+ void DeleteModule(int moduleId);
+ string ExportModule(int moduleId);
+ bool ImportModule(int moduleId, string content);
+ }
+
public class ModuleRepository : IModuleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/NotificationRepository.cs b/Oqtane.Server/Repository/NotificationRepository.cs
index b4603f29..1c20faee 100644
--- a/Oqtane.Server/Repository/NotificationRepository.cs
+++ b/Oqtane.Server/Repository/NotificationRepository.cs
@@ -6,6 +6,19 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface INotificationRepository
+ {
+ IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId);
+ IEnumerable GetNotifications(int siteId, int fromUserId, int toUserId, int count, bool isRead);
+ int GetNotificationCount(int siteId, int fromUserId, int toUserId, bool isRead);
+ Notification AddNotification(Notification notification);
+ Notification UpdateNotification(Notification notification);
+ Notification GetNotification(int notificationId);
+ Notification GetNotification(int notificationId, bool tracking);
+ void DeleteNotification(int notificationId);
+ int DeleteNotifications(int siteId, int age);
+ }
+
public class NotificationRepository : INotificationRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PageModuleRepository.cs b/Oqtane.Server/Repository/PageModuleRepository.cs
index a6f81b69..239a9a67 100644
--- a/Oqtane.Server/Repository/PageModuleRepository.cs
+++ b/Oqtane.Server/Repository/PageModuleRepository.cs
@@ -1,13 +1,22 @@
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPageModuleRepository
+ {
+ IEnumerable GetPageModules(int siteId);
+ PageModule AddPageModule(PageModule pageModule);
+ PageModule UpdatePageModule(PageModule pageModule);
+ PageModule GetPageModule(int pageModuleId);
+ PageModule GetPageModule(int pageModuleId, bool tracking);
+ PageModule GetPageModule(int pageId, int moduleId);
+ void DeletePageModule(int pageModuleId);
+ }
+
public class PageModuleRepository : IPageModuleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PageRepository.cs b/Oqtane.Server/Repository/PageRepository.cs
index f400226f..5f99c150 100644
--- a/Oqtane.Server/Repository/PageRepository.cs
+++ b/Oqtane.Server/Repository/PageRepository.cs
@@ -2,12 +2,22 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
-using Oqtane.Extensions;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPageRepository
+ {
+ IEnumerable GetPages(int siteId);
+ Page AddPage(Page page);
+ Page UpdatePage(Page page);
+ Page GetPage(int pageId);
+ Page GetPage(int pageId, bool tracking);
+ Page GetPage(string path, int siteId);
+ void DeletePage(int pageId);
+ }
+
public class PageRepository : IPageRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/PermissionRepository.cs b/Oqtane.Server/Repository/PermissionRepository.cs
index 1a3b0395..b4f7530d 100644
--- a/Oqtane.Server/Repository/PermissionRepository.cs
+++ b/Oqtane.Server/Repository/PermissionRepository.cs
@@ -8,6 +8,20 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IPermissionRepository
+ {
+ IEnumerable GetPermissions(int siteId, string entityName);
+ IEnumerable GetPermissions(int siteId, string entityName, string permissionName);
+ IEnumerable GetPermissions(int siteId, string entityName, int entityId);
+ IEnumerable GetPermissions(int siteId, string entityName, int entityId, string permissionName);
+ Permission AddPermission(Permission permission);
+ Permission UpdatePermission(Permission permission);
+ void UpdatePermissions(int siteId, string entityName, int entityId, List permissions);
+ Permission GetPermission(int permissionId);
+ void DeletePermission(int permissionId);
+ void DeletePermissions(int siteId, string entityName, int entityId);
+ }
+
public class PermissionRepository : IPermissionRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/ProfileRepository.cs b/Oqtane.Server/Repository/ProfileRepository.cs
index 8e0b895a..b5749951 100644
--- a/Oqtane.Server/Repository/ProfileRepository.cs
+++ b/Oqtane.Server/Repository/ProfileRepository.cs
@@ -5,6 +5,15 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IProfileRepository
+ {
+ IEnumerable GetProfiles(int siteId);
+ Profile AddProfile(Profile profile);
+ Profile UpdateProfile(Profile profile);
+ Profile GetProfile(int profileId);
+ Profile GetProfile(int profileId, bool tracking);
+ void DeleteProfile(int profileId);
+ }
public class ProfileRepository : IProfileRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/RoleRepository.cs b/Oqtane.Server/Repository/RoleRepository.cs
index 3d16eb35..05de9047 100644
--- a/Oqtane.Server/Repository/RoleRepository.cs
+++ b/Oqtane.Server/Repository/RoleRepository.cs
@@ -2,11 +2,20 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Oqtane.Models;
-using Oqtane.Modules.Admin.Users;
-using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IRoleRepository
+ {
+ IEnumerable GetRoles(int siteId);
+ IEnumerable GetRoles(int siteId, bool includeGlobalRoles);
+ Role AddRole(Role role);
+ Role UpdateRole(Role role);
+ Role GetRole(int roleId);
+ Role GetRole(int roleId, bool tracking);
+ void DeleteRole(int roleId);
+ }
+
public class RoleRepository : IRoleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/SearchContentRepository.cs b/Oqtane.Server/Repository/SearchContentRepository.cs
index 5aa214ae..cb2eeee9 100644
--- a/Oqtane.Server/Repository/SearchContentRepository.cs
+++ b/Oqtane.Server/Repository/SearchContentRepository.cs
@@ -1,17 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Oqtane.Extensions;
-using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISearchContentRepository
+ {
+ Task> GetSearchContentsAsync(SearchQuery searchQuery);
+ SearchContent AddSearchContent(SearchContent searchContent);
+ void DeleteSearchContent(int searchContentId);
+ void DeleteSearchContent(string entityName, string entryId);
+ void DeleteSearchContent(string uniqueKey);
+ void DeleteAllSearchContent(int siteId);
+
+ SearchWord GetSearchWord(string word);
+ SearchWord AddSearchWord(SearchWord searchWord);
+
+ IEnumerable GetSearchContentWords(int searchContentId);
+ SearchContentWord AddSearchContentWord(SearchContentWord searchContentWord);
+ SearchContentWord UpdateSearchContentWord(SearchContentWord searchContentWord);
+ }
+
public class SearchContentRepository : ISearchContentRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/SettingRepository.cs b/Oqtane.Server/Repository/SettingRepository.cs
index 16a33811..13c48819 100644
--- a/Oqtane.Server/Repository/SettingRepository.cs
+++ b/Oqtane.Server/Repository/SettingRepository.cs
@@ -8,6 +8,21 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISettingRepository
+ {
+ IEnumerable GetSettings(string entityName);
+ IEnumerable GetSettings(string entityName, int entityId);
+ IEnumerable GetSettings(string entityName1, int entityId1, string entityName2, int entityId2);
+ Setting AddSetting(Setting setting);
+ Setting UpdateSetting(Setting setting);
+ Setting GetSetting(string entityName, int settingId);
+ Setting GetSetting(string entityName, int entityId, string settingName);
+ void DeleteSetting(string entityName, int settingId);
+ void DeleteSettings(string entityName, int entityId);
+ string GetSettingValue(IEnumerable settings, string settingName, string defaultValue);
+ string GetSettingValue(string entityName, int entityId, string settingName, string defaultValue);
+ }
+
public class SettingRepository : ISettingRepository
{
private readonly IDbContextFactory _tenantContextFactory;
diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs
index 48620ead..530c536c 100644
--- a/Oqtane.Server/Repository/SiteRepository.cs
+++ b/Oqtane.Server/Repository/SiteRepository.cs
@@ -9,12 +9,24 @@ using Oqtane.Enums;
using Oqtane.Infrastructure;
using Oqtane.Models;
using Oqtane.Modules;
-using Oqtane.Modules.Admin.Modules;
using Oqtane.Shared;
using Module = Oqtane.Models.Module;
namespace Oqtane.Repository
{
+ public interface ISiteRepository
+ {
+ IEnumerable GetSites();
+ Site AddSite(Site site);
+ Site UpdateSite(Site site);
+ Site GetSite(int siteId);
+ Site GetSite(int siteId, bool tracking);
+ void DeleteSite(int siteId);
+
+ void InitializeSite(Alias alias);
+ void CreatePages(Site site, List pageTemplates, Alias alias);
+ }
+
public class SiteRepository : ISiteRepository
{
private readonly IDbContextFactory _factory;
diff --git a/Oqtane.Server/Repository/SiteTemplateRepository.cs b/Oqtane.Server/Repository/SiteTemplateRepository.cs
index db16600c..fc327e6d 100644
--- a/Oqtane.Server/Repository/SiteTemplateRepository.cs
+++ b/Oqtane.Server/Repository/SiteTemplateRepository.cs
@@ -9,6 +9,11 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ISiteTemplateRepository
+ {
+ IEnumerable GetSiteTemplates();
+ }
+
public class SiteTemplateRepository : ISiteTemplateRepository
{
private readonly IServiceProvider _serviceProvider;
diff --git a/Oqtane.Server/Repository/SqlRepository.cs b/Oqtane.Server/Repository/SqlRepository.cs
index a4689fcf..30102eea 100644
--- a/Oqtane.Server/Repository/SqlRepository.cs
+++ b/Oqtane.Server/Repository/SqlRepository.cs
@@ -12,6 +12,25 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface ISqlRepository
+ {
+ void ExecuteScript(Tenant tenant, string script);
+
+ bool ExecuteScript(string connectionString, string databaseType, Assembly assembly, string filename);
+
+ bool ExecuteScript(Tenant tenant, Assembly assembly, string filename);
+
+ int ExecuteNonQuery(Tenant tenant, string query);
+
+ int ExecuteNonQuery(string connectionString, string databaseType, string query);
+
+ IDataReader ExecuteReader(Tenant tenant, string query);
+
+ IDataReader ExecuteReader(string DBType, string DBConnectionString, string query);
+
+ string GetScriptFromAssembly(Assembly assembly, string fileName);
+ }
+
public class SqlRepository : ISqlRepository
{
private IConfigurationRoot _config;
diff --git a/Oqtane.Server/Repository/TenantRepository.cs b/Oqtane.Server/Repository/TenantRepository.cs
index 25687f48..d5b83117 100644
--- a/Oqtane.Server/Repository/TenantRepository.cs
+++ b/Oqtane.Server/Repository/TenantRepository.cs
@@ -8,6 +8,14 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface ITenantRepository
+ {
+ IEnumerable GetTenants();
+ Tenant AddTenant(Tenant tenant);
+ Tenant UpdateTenant(Tenant tenant);
+ Tenant GetTenant(int tenantId);
+ void DeleteTenant(int tenantId);
+ }
public class TenantRepository : ITenantRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/TenantResolver.cs b/Oqtane.Server/Repository/TenantResolver.cs
index 793006d3..f678a586 100644
--- a/Oqtane.Server/Repository/TenantResolver.cs
+++ b/Oqtane.Server/Repository/TenantResolver.cs
@@ -4,6 +4,12 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
// class deprecated and replaced by ITenantManager
+ public interface ITenantResolver
+ {
+ Alias GetAlias();
+ Tenant GetTenant();
+ }
+
public class TenantResolver : ITenantResolver
{
private readonly ITenantManager _tenantManager;
diff --git a/Oqtane.Server/Repository/ThemeRepository.cs b/Oqtane.Server/Repository/ThemeRepository.cs
index fd010b8c..56331a37 100644
--- a/Oqtane.Server/Repository/ThemeRepository.cs
+++ b/Oqtane.Server/Repository/ThemeRepository.cs
@@ -4,7 +4,6 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
-using System.Reflection.Metadata;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Oqtane.Infrastructure;
@@ -14,6 +13,15 @@ using Oqtane.Themes;
namespace Oqtane.Repository
{
+ public interface IThemeRepository
+ {
+ IEnumerable GetThemes();
+ Theme GetTheme(int themeId, int siteId);
+ void UpdateTheme(Theme theme);
+ void DeleteTheme(int themeId);
+ List FilterThemes(List themes);
+ }
+
public class ThemeRepository : IThemeRepository
{
private MasterDBContext _db;
diff --git a/Oqtane.Server/Repository/UrlMappingRepository.cs b/Oqtane.Server/Repository/UrlMappingRepository.cs
index 82f747da..9c2efbb6 100644
--- a/Oqtane.Server/Repository/UrlMappingRepository.cs
+++ b/Oqtane.Server/Repository/UrlMappingRepository.cs
@@ -6,6 +6,18 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IUrlMappingRepository
+ {
+ IEnumerable GetUrlMappings(int siteId, bool isMapped);
+ UrlMapping AddUrlMapping(UrlMapping urlMapping);
+ UrlMapping UpdateUrlMapping(UrlMapping urlMapping);
+ UrlMapping GetUrlMapping(int urlMappingId);
+ UrlMapping GetUrlMapping(int urlMappingId, bool tracking);
+ UrlMapping GetUrlMapping(int siteId, string url);
+ void DeleteUrlMapping(int urlMappingId);
+ int DeleteUrlMappings(int siteId, int age);
+ }
+
public class UrlMappingRepository : IUrlMappingRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/UserRepository.cs b/Oqtane.Server/Repository/UserRepository.cs
index 4858e7c3..b9f3c7df 100644
--- a/Oqtane.Server/Repository/UserRepository.cs
+++ b/Oqtane.Server/Repository/UserRepository.cs
@@ -2,11 +2,22 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Oqtane.Models;
-using Oqtane.Modules.Admin.Users;
using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IUserRepository
+ {
+ IEnumerable GetUsers();
+ User AddUser(User user);
+ User UpdateUser(User user);
+ User GetUser(int userId);
+ User GetUser(int userId, bool tracking);
+ User GetUser(string username);
+ User GetUser(string username, string email);
+ void DeleteUser(int userId);
+ }
+
public class UserRepository : IUserRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/UserRoleRepository.cs b/Oqtane.Server/Repository/UserRoleRepository.cs
index 6956a20d..9c6a6256 100644
--- a/Oqtane.Server/Repository/UserRoleRepository.cs
+++ b/Oqtane.Server/Repository/UserRoleRepository.cs
@@ -10,6 +10,21 @@ using Oqtane.Shared;
namespace Oqtane.Repository
{
+ public interface IUserRoleRepository
+ {
+ IEnumerable GetUserRoles(int siteId);
+ IEnumerable GetUserRoles(int userId, int siteId);
+ IEnumerable GetUserRoles(string roleName, int siteId);
+ UserRole AddUserRole(UserRole userRole);
+ UserRole UpdateUserRole(UserRole userRole);
+ UserRole GetUserRole(int userRoleId);
+ UserRole GetUserRole(int userRoleId, bool tracking);
+ UserRole GetUserRole(int userId, int roleId);
+ UserRole GetUserRole(int userId, int roleId, bool tracking);
+ void DeleteUserRole(int userRoleId);
+ void DeleteUserRoles(int userId);
+ }
+
public class UserRoleRepository : IUserRoleRepository
{
private readonly IDbContextFactory _dbContextFactory;
diff --git a/Oqtane.Server/Repository/VisitorRepository.cs b/Oqtane.Server/Repository/VisitorRepository.cs
index d3583079..f18bd62a 100644
--- a/Oqtane.Server/Repository/VisitorRepository.cs
+++ b/Oqtane.Server/Repository/VisitorRepository.cs
@@ -6,6 +6,17 @@ using Oqtane.Models;
namespace Oqtane.Repository
{
+ public interface IVisitorRepository
+ {
+ IEnumerable GetVisitors(int siteId, DateTime fromDate);
+ Visitor AddVisitor(Visitor visitor);
+ Visitor UpdateVisitor(Visitor visitor);
+ Visitor GetVisitor(int visitorId);
+ Visitor GetVisitor(int siteId, string IPAddress);
+ void DeleteVisitor(int visitorId);
+ int DeleteVisitors(int siteId, int age);
+ }
+
public class VisitorRepository : IVisitorRepository
{
private readonly IDbContextFactory _dbContextFactory;
From 64b8b5d3c8576322b749ed979a3fd41d191a2eef Mon Sep 17 00:00:00 2001
From: sbwalker
Date: Mon, 11 Aug 2025 16:53:32 -0400
Subject: [PATCH 24/53] consolidate Service interface and implementation
classes
---
Oqtane.Client/Services/AliasService.cs | 40 +++
.../Services/CookieConsentService.cs | 39 ++-
Oqtane.Client/Services/DatabaseService.cs | 12 +
Oqtane.Client/Services/FileService.cs | 98 ++++++-
Oqtane.Client/Services/FolderService.cs | 52 ++++
Oqtane.Client/Services/InstallationService.cs | 32 +++
.../Services/Interfaces/IAliasService.cs | 47 ---
.../Interfaces/ICookieConsentService.cs | 42 ---
.../Services/Interfaces/IDatabaseService.cs | 18 --
.../Services/Interfaces/IFileService.cs | 104 -------
.../Services/Interfaces/IFolderService.cs | 59 ----
.../Interfaces/IInstallationService.cs | 39 ---
.../Services/Interfaces/IJobLogService.cs | 26 --
.../Services/Interfaces/IJobService.cs | 61 ----
.../Services/Interfaces/ILanguageService.cs | 56 ----
.../Interfaces/ILocalizationCookieService.cs | 17 --
.../Interfaces/ILocalizationService.cs | 18 --
.../Services/Interfaces/ILogService.cs | 72 -----
.../Interfaces/IModuleDefinitionService.cs | 56 ----
.../Services/Interfaces/IModuleService.cs | 73 -----
.../Interfaces/INotificationService.cs | 70 -----
.../Interfaces/IOutputCacheService.cs | 18 --
.../Services/Interfaces/IPackageService.cs | 70 -----
.../Services/Interfaces/IPageModuleService.cs | 56 ----
.../Services/Interfaces/IPageService.cs | 71 -----
.../Services/Interfaces/IProfileService.cs | 48 ----
.../Services/Interfaces/IRoleService.cs | 57 ----
.../Interfaces/ISearchResultsService.cs | 13 -
.../Services/Interfaces/ISettingService.cs | 269 ------------------
.../Services/Interfaces/ISiteService.cs | 61 ----
.../Interfaces/ISiteTemplateService.cs | 18 --
.../Services/Interfaces/ISqlService.cs | 18 --
.../Services/Interfaces/ISyncService.cs | 19 --
.../Services/Interfaces/ISystemService.cs | 42 ---
.../Services/Interfaces/ITenantService.cs | 25 --
.../Services/Interfaces/IThemeService.cs | 94 ------
.../Services/Interfaces/ITimeZoneService.cs | 17 --
.../Services/Interfaces/IUrlMappingService.cs | 56 ----
.../Services/Interfaces/IUserRoleService.cs | 72 -----
.../Services/Interfaces/IUserService.cs | 171 -----------
.../Services/Interfaces/IVisitorService.cs | 29 --
Oqtane.Client/Services/JobLogService.cs | 21 +-
Oqtane.Client/Services/JobService.cs | 54 ++++
Oqtane.Client/Services/LanguageService.cs | 49 ++++
.../Services/LocalizationCookieService.cs | 13 +
Oqtane.Client/Services/LocalizationService.cs | 12 +
Oqtane.Client/Services/LogService.cs | 63 ++++
.../Services/ModuleDefinitionService.cs | 49 ++++
Oqtane.Client/Services/ModuleService.cs | 67 +++++
Oqtane.Client/Services/NotificationService.cs | 64 +++++
Oqtane.Client/Services/OutputCacheService.cs | 15 +-
Oqtane.Client/Services/PackageService.cs | 64 ++++-
Oqtane.Client/Services/PageModuleService.cs | 51 ++++
Oqtane.Client/Services/PageService.cs | 65 +++++
Oqtane.Client/Services/ProfileService.cs | 42 +++
Oqtane.Client/Services/RoleService.cs | 51 ++++
.../Services/SearchResultsService.cs | 7 +-
Oqtane.Client/Services/SettingService.cs | 262 +++++++++++++++++
Oqtane.Client/Services/SiteService.cs | 53 ++++
Oqtane.Client/Services/SiteTemplateService.cs | 12 +
Oqtane.Client/Services/SqlService.cs | 13 +
Oqtane.Client/Services/SyncService.cs | 13 +
Oqtane.Client/Services/SystemService.cs | 38 ++-
Oqtane.Client/Services/TenantService.cs | 19 ++
Oqtane.Client/Services/ThemeService.cs | 89 +++++-
Oqtane.Client/Services/TimeZoneService.cs | 12 +
Oqtane.Client/Services/UrlMappingService.cs | 50 ++++
Oqtane.Client/Services/UserRoleService.cs | 66 +++++
Oqtane.Client/Services/UserService.cs | 168 ++++++++++-
Oqtane.Client/Services/VisitorService.cs | 22 ++
70 files changed, 1763 insertions(+), 1996 deletions(-)
delete mode 100644 Oqtane.Client/Services/Interfaces/IAliasService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IDatabaseService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IFileService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IFolderService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IInstallationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IJobLogService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IJobService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILanguageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILocalizationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ILogService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IModuleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/INotificationService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPackageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPageModuleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IPageService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IProfileService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IRoleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISettingService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISiteService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISiteTemplateService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISqlService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISyncService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ISystemService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ITenantService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IThemeService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/ITimeZoneService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUrlMappingService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUserRoleService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IUserService.cs
delete mode 100644 Oqtane.Client/Services/Interfaces/IVisitorService.cs
diff --git a/Oqtane.Client/Services/AliasService.cs b/Oqtane.Client/Services/AliasService.cs
index 714f1061..0fb0600b 100644
--- a/Oqtane.Client/Services/AliasService.cs
+++ b/Oqtane.Client/Services/AliasService.cs
@@ -8,6 +8,46 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve and store information.
+ ///
+ public interface IAliasService
+ {
+ ///
+ /// Get all aliases in the system
+ ///
+ ///
+ Task> GetAliasesAsync();
+
+ ///
+ /// Get a single alias
+ ///
+ /// The ID, not to be confused with a ID
+ ///
+ Task GetAliasAsync(int aliasId);
+
+ ///
+ /// Save another in the DB. It must already contain all the information incl. it belongs to.
+ ///
+ /// An to add.
+ ///
+ Task AddAliasAsync(Alias alias);
+
+ ///
+ /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
+ ///
+ /// The to update.
+ ///
+ Task UpdateAliasAsync(Alias alias);
+
+ ///
+ /// Remove an from the DB.
+ ///
+ /// The Alias ID, not to be confused with a Site ID.
+ ///
+ Task DeleteAliasAsync(int aliasId);
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class AliasService : ServiceBase, IAliasService
diff --git a/Oqtane.Client/Services/CookieConsentService.cs b/Oqtane.Client/Services/CookieConsentService.cs
index 83c2abc7..29b3a40d 100644
--- a/Oqtane.Client/Services/CookieConsentService.cs
+++ b/Oqtane.Client/Services/CookieConsentService.cs
@@ -1,13 +1,46 @@
-using Oqtane.Models;
using System.Threading.Tasks;
using System.Net.Http;
-using System;
using Oqtane.Documentation;
using Oqtane.Shared;
-using System.Globalization;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve cookie consent information.
+ ///
+ public interface ICookieConsentService
+ {
+ ///
+ /// Get cookie consent bar actioned status
+ ///
+ ///
+ Task IsActionedAsync();
+
+ ///
+ /// Get cookie consent status
+ ///
+ ///
+ Task CanTrackAsync(bool optOut);
+
+ ///
+ /// create actioned cookie
+ ///
+ ///
+ Task CreateActionedCookieAsync();
+
+ ///
+ /// create consent cookie
+ ///
+ ///
+ Task CreateConsentCookieAsync();
+
+ ///
+ /// widhdraw consent cookie
+ ///
+ ///
+ Task WithdrawConsentCookieAsync();
+ }
+
///
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class CookieConsentService : ServiceBase, ICookieConsentService
diff --git a/Oqtane.Client/Services/DatabaseService.cs b/Oqtane.Client/Services/DatabaseService.cs
index bfa06865..3ca4a1a2 100644
--- a/Oqtane.Client/Services/DatabaseService.cs
+++ b/Oqtane.Client/Services/DatabaseService.cs
@@ -8,6 +8,18 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to retrieve information.
+ ///
+ public interface IDatabaseService
+ {
+ ///
+ /// Returns a list of databases
+ ///
+ ///
+ Task> GetDatabasesAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class DatabaseService : ServiceBase, IDatabaseService
{
diff --git a/Oqtane.Client/Services/FileService.cs b/Oqtane.Client/Services/FileService.cs
index 9bc563c6..2b45455a 100644
--- a/Oqtane.Client/Services/FileService.cs
+++ b/Oqtane.Client/Services/FileService.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
@@ -10,6 +9,103 @@ using Oqtane.Shared;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / upload / download files.
+ ///
+ public interface IFileService
+ {
+ ///
+ /// Get all s in the specified Folder
+ ///
+ /// The folder ID
+ ///
+ Task> GetFilesAsync(int folderId);
+
+ ///
+ /// Get all s in the specified folder.
+ ///
+ ///
+ /// The folder path relative to where the files are stored.
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(string folder);
+
+ ///
+ /// Get one
+ ///
+ ///
+ ///
+ Task GetFileAsync(int fileId);
+
+ ///
+ /// Get a based on the and file name.
+ ///
+ /// Reference to the
+ /// name of the file
+ ///
+ ///
+ Task GetFileAsync(int folderId, string name);
+
+ ///
+ /// Add / store a record.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task AddFileAsync(File file);
+
+ ///
+ /// Update a record.
+ /// Use this for rename a file or change some attributes.
+ /// This does not contain the file contents.
+ ///
+ ///
+ ///
+ Task UpdateFileAsync(File file);
+
+ ///
+ /// Delete a
+ ///
+ ///
+ ///
+ Task DeleteFileAsync(int fileId);
+
+ ///
+ /// Upload a file from a URL to a
+ ///
+ ///
+ ///
+ ///
+ ///
+ Task UploadFileAsync(string url, int folderId, string name);
+
+ ///
+ /// Get / download a file (the body).
+ ///
+ /// Reference to a
+ /// The bytes of the file
+ Task DownloadFileAsync(int fileId);
+
+ ///
+ /// Retrieve a list of files from a and
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task> GetFilesAsync(int siteId, string folderPath);
+
+ ///
+ /// Unzips the contents of a zip file
+ ///
+ /// Reference to the
+ ///
+ ///
+ Task UnzipFileAsync(int fileId);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FileService : ServiceBase, IFileService
{
diff --git a/Oqtane.Client/Services/FolderService.cs b/Oqtane.Client/Services/FolderService.cs
index 2ce045db..9a099777 100644
--- a/Oqtane.Client/Services/FolderService.cs
+++ b/Oqtane.Client/Services/FolderService.cs
@@ -9,6 +9,58 @@ using Oqtane.Documentation;
namespace Oqtane.Services
{
+ ///
+ /// Service to get / create / modify objects.
+ ///
+ public interface IFolderService
+ {
+ ///
+ /// Retrieve root folders of a
+ ///
+ ///
+ ///
+ Task> GetFoldersAsync(int siteId);
+
+ ///
+ /// Retrieve the information of one
+ ///
+ ///
+ ///
+ Task GetFolderAsync(int folderId);
+
+ ///
+ /// Create one Folder using a object.
+ ///
+ ///
+ ///
+ Task AddFolderAsync(Folder folder);
+
+ ///
+ /// Update the information about a
+ /// Use this to rename the folder etc.
+ ///
+ ///
+ ///
+ Task UpdateFolderAsync(Folder folder);
+
+ ///
+ /// Delete a
+ ///
+ /// Reference to a
+ ///
+ Task DeleteFolderAsync(int folderId);
+
+ ///
+ /// Get a of a based on the path.
+ ///
+ /// Reference to the
+ /// Path of the folder
+ /// TODO: todoc verify exactly from where the folder path must start
+ ///
+ ///
+ Task GetFolderAsync(int siteId, [NotNull] string folderPath);
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FolderService : ServiceBase, IFolderService
{
diff --git a/Oqtane.Client/Services/InstallationService.cs b/Oqtane.Client/Services/InstallationService.cs
index e0c388c8..28b80c3b 100644
--- a/Oqtane.Client/Services/InstallationService.cs
+++ b/Oqtane.Client/Services/InstallationService.cs
@@ -10,6 +10,38 @@ using System.Linq;
namespace Oqtane.Services
{
+ ///
+ /// Service to manage (install master database / upgrade version / etc.) the installation
+ ///
+ public interface IInstallationService
+ {
+ ///
+ /// Returns a status/message object with the current installation state
+ ///
+ ///
+ Task IsInstalled();
+
+ ///
+ /// Starts the installation process
+ ///
+ /// connectionString, database type, alias etc.
+ /// internal status/message object
+ Task Install(InstallConfig config);
+
+ ///
+ /// Starts the upgrade process
+ ///
+ /// indicates if files should be backed up during upgrade
+ /// internal status/message object
+ Task Upgrade(bool backup);
+
+ ///
+ /// Restarts the installation
+ ///
+ /// internal status/message object
+ Task RestartAsync();
+ }
+
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class InstallationService : ServiceBase, IInstallationService
{
diff --git a/Oqtane.Client/Services/Interfaces/IAliasService.cs b/Oqtane.Client/Services/Interfaces/IAliasService.cs
deleted file mode 100644
index 6b002ec7..00000000
--- a/Oqtane.Client/Services/Interfaces/IAliasService.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store information.
- ///
- public interface IAliasService
- {
- ///
- /// Get all aliases in the system
- ///
- ///
- Task> GetAliasesAsync();
-
- ///
- /// Get a single alias
- ///
- /// The ID, not to be confused with a ID
- ///
- Task GetAliasAsync(int aliasId);
-
- ///
- /// Save another in the DB. It must already contain all the information incl. it belongs to.
- ///
- /// An to add.
- ///
- Task AddAliasAsync(Alias alias);
-
- ///
- /// Update an in the DB. Make sure the object is correctly filled, as it must update an existing record.
- ///
- /// The to update.
- ///
- Task UpdateAliasAsync(Alias alias);
-
- ///
- /// Remove an from the DB.
- ///
- /// The Alias ID, not to be confused with a Site ID.
- ///
- Task DeleteAliasAsync(int aliasId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs b/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
deleted file mode 100644
index 71580d7e..00000000
--- a/Oqtane.Client/Services/Interfaces/ICookieConsentService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve cookie consent information.
- ///
- public interface ICookieConsentService
- {
- ///
- /// Get cookie consent bar actioned status
- ///
- ///
- Task IsActionedAsync();
-
- ///
- /// Get cookie consent status
- ///
- ///
- Task CanTrackAsync(bool optOut);
-
- ///
- /// create actioned cookie
- ///
- ///
- Task CreateActionedCookieAsync();
-
- ///
- /// create consent cookie
- ///
- ///
- Task CreateConsentCookieAsync();
-
- ///
- /// widhdraw consent cookie
- ///
- ///
- Task WithdrawConsentCookieAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs b/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
deleted file mode 100644
index 94ca3f77..00000000
--- a/Oqtane.Client/Services/Interfaces/IDatabaseService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve information.
- ///
- public interface IDatabaseService
- {
- ///
- /// Returns a list of databases
- ///
- ///
- Task> GetDatabasesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFileService.cs b/Oqtane.Client/Services/Interfaces/IFileService.cs
deleted file mode 100644
index 451d3c4d..00000000
--- a/Oqtane.Client/Services/Interfaces/IFileService.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / upload / download files.
- ///
- public interface IFileService
- {
- ///
- /// Get all s in the specified Folder
- ///
- /// The folder ID
- ///
- Task> GetFilesAsync(int folderId);
-
- ///
- /// Get all s in the specified folder.
- ///
- ///
- /// The folder path relative to where the files are stored.
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(string folder);
-
- ///
- /// Get one
- ///
- ///
- ///
- Task GetFileAsync(int fileId);
-
- ///
- /// Get a based on the and file name.
- ///
- /// Reference to the
- /// name of the file
- ///
- ///
- Task GetFileAsync(int folderId, string name);
-
- ///
- /// Add / store a record.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task AddFileAsync(File file);
-
- ///
- /// Update a record.
- /// Use this for rename a file or change some attributes.
- /// This does not contain the file contents.
- ///
- ///
- ///
- Task UpdateFileAsync(File file);
-
- ///
- /// Delete a
- ///
- ///
- ///
- Task DeleteFileAsync(int fileId);
-
- ///
- /// Upload a file from a URL to a
- ///
- ///
- ///
- ///
- ///
- Task UploadFileAsync(string url, int folderId, string name);
-
- ///
- /// Get / download a file (the body).
- ///
- /// Reference to a
- /// The bytes of the file
- Task DownloadFileAsync(int fileId);
-
- ///
- /// Retrieve a list of files from a and
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task> GetFilesAsync(int siteId, string folderPath);
-
- ///
- /// Unzips the contents of a zip file
- ///
- /// Reference to the
- ///
- ///
- Task UnzipFileAsync(int fileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IFolderService.cs b/Oqtane.Client/Services/Interfaces/IFolderService.cs
deleted file mode 100644
index 35e96956..00000000
--- a/Oqtane.Client/Services/Interfaces/IFolderService.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to get / create / modify objects.
- ///
- public interface IFolderService
- {
- ///
- /// Retrieve root folders of a
- ///
- ///
- ///
- Task> GetFoldersAsync(int siteId);
-
- ///
- /// Retrieve the information of one
- ///
- ///
- ///
- Task GetFolderAsync(int folderId);
-
- ///
- /// Create one Folder using a object.
- ///
- ///
- ///
- Task AddFolderAsync(Folder folder);
-
- ///
- /// Update the information about a
- /// Use this to rename the folder etc.
- ///
- ///
- ///
- Task UpdateFolderAsync(Folder folder);
-
- ///
- /// Delete a
- ///
- /// Reference to a
- ///
- Task DeleteFolderAsync(int folderId);
-
- ///
- /// Get a of a based on the path.
- ///
- /// Reference to the
- /// Path of the folder
- /// TODO: todoc verify exactly from where the folder path must start
- ///
- ///
- Task GetFolderAsync(int siteId, [NotNull]string folderPath);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IInstallationService.cs b/Oqtane.Client/Services/Interfaces/IInstallationService.cs
deleted file mode 100644
index 1e2311ce..00000000
--- a/Oqtane.Client/Services/Interfaces/IInstallationService.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-using Oqtane.Shared;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage (install master database / upgrade version / etc.) the installation
- ///
- public interface IInstallationService
- {
- ///
- /// Returns a status/message object with the current installation state
- ///
- ///
- Task IsInstalled();
-
- ///
- /// Starts the installation process
- ///
- /// connectionString, database type, alias etc.
- /// internal status/message object
- Task Install(InstallConfig config);
-
- ///
- /// Starts the upgrade process
- ///
- /// indicates if files should be backed up during upgrade
- /// internal status/message object
- Task Upgrade(bool backup);
-
- ///
- /// Restarts the installation
- ///
- /// internal status/message object
- Task RestartAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobLogService.cs b/Oqtane.Client/Services/Interfaces/IJobLogService.cs
deleted file mode 100644
index e6a10a20..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobLogService.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to read the job schedule log
- ///
- public interface IJobLogService
- {
- ///
- /// Return a list of entries
- ///
- ///
- ///
- Task> GetJobLogsAsync(int jobId);
-
- ///
- /// Return a entry for the given Id
- ///
- ///
- ///
- Task GetJobLogAsync(int jobLogId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IJobService.cs b/Oqtane.Client/Services/Interfaces/IJobService.cs
deleted file mode 100644
index 984f4b59..00000000
--- a/Oqtane.Client/Services/Interfaces/IJobService.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage jobs ()
- ///
- public interface IJobService
- {
- ///
- /// Returns a list of all jobs
- ///
- ///
- Task> GetJobsAsync();
-
- ///
- /// Return a specific job
- ///
- ///
- ///
- Task GetJobAsync(int jobId);
-
- ///
- /// Adds a new job
- ///
- ///
- ///
- Task AddJobAsync(Job job);
-
- ///
- /// Updates an existing job
- ///
- ///
- ///
- Task UpdateJobAsync(Job job);
-
- ///
- /// Delete an existing job
- ///
- ///
- ///
- Task DeleteJobAsync(int jobId);
-
- ///
- /// Starts the given job
- ///
- ///
- ///
- Task StartJobAsync(int jobId);
-
- ///
- /// Stops the given job
- ///
- ///
- ///
- Task StopJobAsync(int jobId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILanguageService.cs b/Oqtane.Client/Services/Interfaces/ILanguageService.cs
deleted file mode 100644
index bf7aa9a7..00000000
--- a/Oqtane.Client/Services/Interfaces/ILanguageService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage entries
- ///
- public interface ILanguageService
- {
- ///
- /// Returns a list of all available languages for the given
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId);
-
- ///
- /// Returns a list of all available languages for the given and package
- ///
- ///
- ///
- ///
- Task> GetLanguagesAsync(int siteId, string packageName);
-
- ///
- /// Returns the given language
- ///
- ///
- ///
- Task GetLanguageAsync(int languageId);
-
- ///
- /// Adds the given language
- ///
- ///
- ///
- Task AddLanguageAsync(Language language);
-
- ///
- /// Edits the given language
- ///
- ///
- ///
- Task EditLanguageAsync(Language language);
-
- ///
- /// Deletes the given language
- ///
- ///
- ///
- Task DeleteLanguageAsync(int languageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
deleted file mode 100644
index a422d432..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationCookieService.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to set localization cookie
- ///
- public interface ILocalizationCookieService
- {
- ///
- /// Set the localization cookie
- ///
- ///
- ///
- Task SetLocalizationCookieAsync(string culture);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs b/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
deleted file mode 100644
index 543f8eba..00000000
--- a/Oqtane.Client/Services/Interfaces/ILocalizationService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve localizations ()
- ///
- public interface ILocalizationService
- {
- ///
- /// Returns a collection of supported cultures
- ///
- ///
- Task> GetCulturesAsync(bool installed);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ILogService.cs b/Oqtane.Client/Services/Interfaces/ILogService.cs
deleted file mode 100644
index 28fe51b2..00000000
--- a/Oqtane.Client/Services/Interfaces/ILogService.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using Oqtane.Models;
-using Oqtane.Shared;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Enums;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store entries
- ///
- public interface ILogService
- {
- ///
- /// Returns a list of log entires for the given params
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetLogsAsync(int siteId, string level, string function, int rows);
-
- ///
- /// Returns a specific log entry for the given id
- ///
- ///
- ///
- Task GetLogAsync(int logId);
-
- ///
- /// Clear the entire logs of the given site.
- ///
- ///
- ///
- Task DeleteLogsAsync(int siteId);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
-
- ///
- /// Creates a new log entry
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task Log(Alias alias, int? pageId, int? moduleId, int? userId, string category, string feature, LogFunction function, LogLevel level, Exception exception, string message, params object[] args);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs b/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
deleted file mode 100644
index 707728eb..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleDefinitionService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage a
- ///
- public interface IModuleDefinitionService
- {
- ///
- /// Returns a list of module definitions for the given site
- ///
- ///
- ///
- Task> GetModuleDefinitionsAsync(int siteId);
-
- ///
- /// Returns a specific module definition
- ///
- ///
- ///
- ///
- Task GetModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Updates a existing module definition
- ///
- ///
- ///
- Task UpdateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Deletes a module definition
- ///
- ///
- ///
- ///
- Task DeleteModuleDefinitionAsync(int moduleDefinitionId, int siteId);
-
- ///
- /// Creates a new module definition
- ///
- ///
- ///
- Task CreateModuleDefinitionAsync(ModuleDefinition moduleDefinition);
-
- ///
- /// Returns a list of module definition templates
- ///
- ///
- Task> GetModuleDefinitionTemplatesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IModuleService.cs b/Oqtane.Client/Services/Interfaces/IModuleService.cs
deleted file mode 100644
index ea6beab3..00000000
--- a/Oqtane.Client/Services/Interfaces/IModuleService.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to retrieve and store modules ()
- ///
- public interface IModuleService
- {
- ///
- /// Returns a list of modules for the given site
- ///
- ///
- ///
- Task> GetModulesAsync(int siteId);
-
- ///
- /// Returns a specific module
- ///
- ///
- ///
- Task GetModuleAsync(int moduleId);
-
- ///
- /// Adds a new module
- ///
- ///
- ///
- Task AddModuleAsync(Module module);
-
- ///
- /// Updates an existing module
- ///
- ///
- ///
- Task UpdateModuleAsync(Module module);
-
- ///
- /// Deletes a module
- ///
- ///
- ///
- Task DeleteModuleAsync(int moduleId);
-
- ///
- /// Imports a module
- ///
- ///
- /// module in JSON format
- ///
- Task ImportModuleAsync(int moduleId, int pageId, string content);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- /// module content in JSON format
- Task ExportModuleAsync(int moduleId, int pageId);
-
- ///
- /// Exports a given module
- ///
- ///
- ///
- ///
- ///
- /// file id
- Task ExportModuleAsync(int moduleId, int pageId, int folderId, string filename);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/INotificationService.cs b/Oqtane.Client/Services/Interfaces/INotificationService.cs
deleted file mode 100644
index 760f4a36..00000000
--- a/Oqtane.Client/Services/Interfaces/INotificationService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve notifications ()
- ///
- public interface INotificationService
- {
- ///
- /// Return a list of notifications
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetNotificationsAsync(int siteId, string direction, int userId, int count, bool isRead);
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task GetNotificationCountAsync(int siteId, string direction, int userId, bool isRead);
-
- ///
- /// Returns a specific notifications
- ///
- ///
- ///
- Task GetNotificationAsync(int notificationId);
-
- ///
- /// Creates a new notification
- ///
- ///
- ///
- Task AddNotificationAsync(Notification notification);
-
- ///
- /// Updates a existing notification
- ///
- ///
- ///
- Task UpdateNotificationAsync(Notification notification);
-
- ///
- /// Deletes a notification
- ///
- ///
- ///
- Task DeleteNotificationAsync(int notificationId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs b/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
deleted file mode 100644
index 08826146..00000000
--- a/Oqtane.Client/Services/Interfaces/IOutputCacheService.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage cache
- ///
- public interface IOutputCacheService
- {
- ///
- /// Evicts the output cache for a specific tag
- ///
- ///
- ///
- Task EvictByTag(string tag);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPackageService.cs b/Oqtane.Client/Services/Interfaces/IPackageService.cs
deleted file mode 100644
index ff930ccc..00000000
--- a/Oqtane.Client/Services/Interfaces/IPackageService.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
-
- ///
- /// Service to manage packages ()
- ///
- public interface IPackageService
- {
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- Task> GetPackagesAsync(string type);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package);
-
- ///
- /// Returns a list of packages matching the given parameters
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- Task> GetPackagesAsync(string type, string search, string price, string package, string sort);
-
- ///
- /// Returns a list of packages based on installationid
- ///
- ///
- Task> GetPackageUpdatesAsync(string type);
-
- ///
- /// Returns a specific package
- ///
- ///
- ///
- ///
- Task GetPackageAsync(string packageId, string version, bool download);
-
- ///
- /// Downloads a specific package as .nupkg file
- ///
- ///
- ///
- ///
- ///
- Task DownloadPackageAsync(string packageId, string version);
-
- ///
- /// Installs all packages located in //TODO: 2dm where?
- ///
- ///
- Task InstallPackagesAsync();
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs b/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
deleted file mode 100644
index 77bc5d3b..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageModuleService.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Oqtane.Models;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve a
- ///
- public interface IPageModuleService
- {
-
- ///
- /// Returns a specific page module
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageModuleId);
-
- ///
- /// Return a specific page module
- ///
- ///
- ///
- ///
- Task GetPageModuleAsync(int pageId, int moduleId);
-
- ///
- /// Creates a new page module
- ///
- ///
- ///
- Task AddPageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates a existing page module
- ///
- ///
- ///
- Task UpdatePageModuleAsync(PageModule pageModule);
-
- ///
- /// Updates order of all page modules in the given pane
- ///
- ///
- ///
- ///
- Task UpdatePageModuleOrderAsync(int pageId, string pane);
-
- ///
- /// Deletes a page module
- ///
- ///
- ///
- Task DeletePageModuleAsync(int pageModuleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IPageService.cs b/Oqtane.Client/Services/Interfaces/IPageService.cs
deleted file mode 100644
index d4002c3f..00000000
--- a/Oqtane.Client/Services/Interfaces/IPageService.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Services to store and retrieve a
- ///
- public interface IPageService
- {
- ///
- /// Returns a list of pages
- ///
- ///
- ///
- Task> GetPagesAsync(int siteId);
-
- ///
- /// Returns a specific page
- ///
- ///
- ///
- Task GetPageAsync(int pageId);
-
- ///
- /// Returns a specific page by its defined path
- ///
- ///
- ///
- ///
- Task GetPageAsync(string path, int siteId);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(Page page);
-
- ///
- /// Adds a new page
- ///
- ///
- ///
- Task AddPageAsync(int pageId, int userId);
-
- ///
- /// Updates a existing page
- ///
- ///
- ///
- Task UpdatePageAsync(Page page);
-
- ///
- /// Updates order of all page modules in the given parent
- ///
- ///
- ///
- ///
- ///
- Task UpdatePageOrderAsync(int siteId, int pageId, int? parentId);
-
- ///
- /// Deletes a page
- ///
- ///
- ///
- Task DeletePageAsync(int pageId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IProfileService.cs b/Oqtane.Client/Services/Interfaces/IProfileService.cs
deleted file mode 100644
index 72c2506c..00000000
--- a/Oqtane.Client/Services/Interfaces/IProfileService.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to store and retrieve entries
- ///
- public interface IProfileService
- {
-
- ///
- /// Returns a list of profile entries
- ///
- ///
- ///
- Task> GetProfilesAsync(int siteId);
-
- ///
- /// Returns a specific profile entry
- ///
- ///
- ///
- Task GetProfileAsync(int profileId);
-
- ///
- /// Creates a new profile entry
- ///
- ///
- ///
- Task AddProfileAsync(Profile profile);
-
- ///
- /// Updates an existing profile entry
- ///
- ///
- ///
- Task UpdateProfileAsync(Profile profile);
-
- ///
- /// Deletes a profile entry
- ///
- ///
- ///
- Task DeleteProfileAsync(int profileId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/IRoleService.cs b/Oqtane.Client/Services/Interfaces/IRoleService.cs
deleted file mode 100644
index 65d91023..00000000
--- a/Oqtane.Client/Services/Interfaces/IRoleService.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Oqtane.Models;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s on a
- ///
- public interface IRoleService
- {
- ///
- /// Get all s of this .
- ///
- /// Will exclude global roles which are for all sites. To get those as well, use the overload
- ///
- /// ID-reference of a
- ///
- Task> GetRolesAsync(int siteId);
-
- ///
- /// Get roles of the and optionally include global Roles.
- ///
- /// ID-reference to a
- /// True if it should also include global roles. False will return the same data as just calling
- ///
- Task> GetRolesAsync(int siteId, bool includeGlobalRoles);
-
- ///
- /// Get one specific
- ///
- /// ID-reference of a
- ///
- Task GetRoleAsync(int roleId);
-
- ///
- /// Add / save a new to the database.
- ///
- ///
- ///
- Task AddRoleAsync(Role role);
-
- ///
- /// Update a in the database.
- ///
- ///
- ///
- Task UpdateRoleAsync(Role role);
-
- ///
- /// Delete / mark-as-deleted a in the database.
- ///
- /// ID-reference of a
- ///
- Task DeleteRoleAsync(int roleId);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs b/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
deleted file mode 100644
index 49eb02ec..00000000
--- a/Oqtane.Client/Services/Interfaces/ISearchResultsService.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Oqtane.Documentation;
-using Oqtane.Models;
-
-namespace Oqtane.Services
-{
- [PrivateApi("Mark SearchResults classes as private, since it's not very useful in the public docs")]
- public interface ISearchResultsService
- {
- Task GetSearchResultsAsync(SearchQuery searchQuery);
- }
-}
diff --git a/Oqtane.Client/Services/Interfaces/ISettingService.cs b/Oqtane.Client/Services/Interfaces/ISettingService.cs
deleted file mode 100644
index 2f4c4b94..00000000
--- a/Oqtane.Client/Services/Interfaces/ISettingService.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using Oqtane.Models;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Oqtane.Services
-{
- ///
- /// Service to manage s
- ///
- public interface ISettingService
- {
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetTenantSettingsAsync();
-
- ///
- /// Updates a tenant setting
- ///
- ///
- ///
- Task UpdateTenantSettingsAsync(Dictionary tenantSettings);
-
- ///
- /// Returns a key-value dictionary of all site settings for the given site
- ///
- ///
- ///
- Task> GetSiteSettingsAsync(int siteId);
-
- ///
- /// Updates a site setting
- ///
- ///
- ///
- ///
- Task UpdateSiteSettingsAsync(Dictionary siteSettings, int siteId);
-
- ///
- /// Clears site option cache
- ///
- ///
- Task ClearSiteSettingsCacheAsync();
-
- ///
- /// Returns a key-value dictionary of all page settings for the given page
- ///
- ///
- ///
- Task> GetPageSettingsAsync(int pageId);
-
- ///
- /// Updates a page setting
- ///
- ///
- ///
- ///
- Task UpdatePageSettingsAsync(Dictionary pageSettings, int pageId);
-
- ///
- /// Returns a key-value dictionary of all page module settings for the given page module
- ///
- ///
- ///
- Task> GetPageModuleSettingsAsync(int pageModuleId);
-
- ///
- /// Updates a page module setting
- ///
- ///
- ///
- ///
- Task UpdatePageModuleSettingsAsync(Dictionary pageModuleSettings, int pageModuleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleSettingsAsync(int moduleId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleSettingsAsync(Dictionary moduleSettings, int moduleId);
-
- ///
- /// Returns a key-value dictionary of all module settings for the given module
- ///
- ///
- ///
- Task> GetModuleDefinitionSettingsAsync(int moduleDefinitionId);
-
- ///
- /// Updates a module setting
- ///
- ///
- ///
- ///
- Task UpdateModuleDefinitionSettingsAsync(Dictionary moduleDefinitionSettings, int moduleDefinitionId);
-
- ///
- /// Returns a key-value dictionary of all user settings for the given user
- ///
- ///
- ///
- Task> GetUserSettingsAsync(int userId);
-
- ///
- /// Updates a user setting
- ///
- ///
- ///
- ///
- Task UpdateUserSettingsAsync(Dictionary userSettings, int userId);
-
- ///
- /// Returns a key-value dictionary of all folder settings for the given folder
- ///
- ///
- ///
- Task> GetFolderSettingsAsync(int folderId);
-
-
- ///
- /// Updates a folder setting
- ///
- ///
- ///
- ///
- Task UpdateFolderSettingsAsync(Dictionary folderSettings, int folderId);
-
- ///
- /// Returns a key-value dictionary of all tenant settings
- ///
- ///
- Task> GetHostSettingsAsync();
-
- ///
- /// Updates a host setting
- ///
- ///
- ///
- Task UpdateHostSettingsAsync(Dictionary hostSettings);
-
- ///
- /// Returns a key-value dictionary of all settings for the given visitor
- ///
- ///
- ///
- Task> GetVisitorSettingsAsync(int visitorId);
-
- ///
- /// Updates a visitor setting
- ///
- ///
- ///
- ///
- Task UpdateVisitorSettingsAsync(Dictionary visitorSettings, int visitorId);
-
- ///
- /// Returns a key-value dictionary of all settings for the given entityName
- ///
- ///
- ///
- Task> GetSettingsAsync(string entityName, int entityId);
-
- ///
- /// Updates settings for a given entityName and Id
- ///
- ///
- ///
- ///
- ///
- Task UpdateSettingsAsync(Dictionary settings, string entityName, int entityId);
-
- ///