commit
acc454c5cd
|
@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
using Oqtane.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
@ -70,6 +71,22 @@ namespace Oqtane.Repository
|
||||||
item.CurrentValues[nameof(IAuditable.ModifiedBy)] = username;
|
item.CurrentValues[nameof(IAuditable.ModifiedBy)] = username;
|
||||||
item.CurrentValues[nameof(IAuditable.ModifiedOn)] = date;
|
item.CurrentValues[nameof(IAuditable.ModifiedOn)] = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.Entity is IDeletable deleted && item.State != EntityState.Added)
|
||||||
|
{
|
||||||
|
if ((bool)item.CurrentValues[nameof(IDeletable.IsDeleted)]
|
||||||
|
&& !item.GetDatabaseValues().GetValue<bool>(nameof(IDeletable.IsDeleted)))
|
||||||
|
{
|
||||||
|
item.CurrentValues[nameof(IDeletable.DeletedBy)] = username;
|
||||||
|
item.CurrentValues[nameof(IDeletable.DeletedOn)] = date;
|
||||||
|
}
|
||||||
|
else if (!(bool)item.CurrentValues[nameof(IDeletable.IsDeleted)]
|
||||||
|
&& item.GetDatabaseValues().GetValue<bool>(nameof(IDeletable.IsDeleted)))
|
||||||
|
{
|
||||||
|
item.CurrentValues[nameof(IDeletable.DeletedBy)] = null;
|
||||||
|
item.CurrentValues[nameof(IDeletable.DeletedOn)] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.SaveChanges();
|
return base.SaveChanges();
|
||||||
|
|
11
Oqtane.Shared/Shared/IDeletable.cs
Normal file
11
Oqtane.Shared/Shared/IDeletable.cs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Oqtane.Shared
|
||||||
|
{
|
||||||
|
public interface IDeletable
|
||||||
|
{
|
||||||
|
string DeletedBy { get; set; }
|
||||||
|
DateTime? DeletedOn { get; set; }
|
||||||
|
bool IsDeleted { get; set; }
|
||||||
|
}
|
||||||
|
}
|
15
README.md
15
README.md
|
@ -7,9 +7,9 @@ Oqtane uses Blazor, a new web framework for .NET Core that lets you build intera
|
||||||
|
|
||||||
**To get started with Oqtane:**
|
**To get started with Oqtane:**
|
||||||
|
|
||||||
1. Oqtane is currently compatible with **[.NET Core 3.0 RC 1 SDK (3.0.100-rc1-014190)](https://dotnet.microsoft.com/download/dotnet-core/3.0)**.
|
1. Oqtane is currently compatible with **[.NET Core 3.0](https://dotnet.microsoft.com/download/dotnet-core/3.0)**.
|
||||||
|
|
||||||
2. Install the latest **Preview** edition of [Visual Studio 2019](https://visualstudio.com/preview) with the **ASP.NET and web development** workload. Installing the latest **Preview** edition will also install the latest preview of .NET Core 3.
|
2. Install the latest edition of [Visual Studio 2019](https://visualstudio.com/vs/) with the **ASP.NET and web development** workload. Installing the latest edition will also install the latest version of .NET Core 3.0.
|
||||||
|
|
||||||
3. Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file. If you want to develop using **server-side** Blazor ( which includes a full debugging experience in Visual Studio ) you should choose to Build the solution using the default Debug configuration. If you want to develop using **client-side** Blazor ( WebAssembly ) you should first choose the "Wasm" configuration option in the Visual Studio toolbar and then Build.
|
3. Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file. If you want to develop using **server-side** Blazor ( which includes a full debugging experience in Visual Studio ) you should choose to Build the solution using the default Debug configuration. If you want to develop using **client-side** Blazor ( WebAssembly ) you should first choose the "Wasm" configuration option in the Visual Studio toolbar and then Build.
|
||||||
|
|
||||||
|
@ -20,21 +20,15 @@ This project is a work in progress and the schedule for implementing the items i
|
||||||
|
|
||||||
Security
|
Security
|
||||||
- Logging
|
- Logging
|
||||||
|
- Need support for JwT tokens for external client access to API
|
||||||
|
|
||||||
Design
|
Design
|
||||||
- Need modern Admin UI theme
|
- Need modern Admin UI theme
|
||||||
- Need to cleanly separate site.css
|
- Need to cleanly separate site.css
|
||||||
- CSS registration for modules and skins
|
|
||||||
|
|
||||||
Packaging
|
|
||||||
- Need ability to package/install Modules
|
|
||||||
- Need ability to package/install Themes
|
|
||||||
|
|
||||||
Admin
|
Admin
|
||||||
- Need fully functional administrative modules for all core entities ( user, role, site, etc… )
|
- Need fully functional administrative modules for all core entities ( user, role, site, etc… )
|
||||||
- Need ability to create a new Site and auto provision Admin pages/modules
|
|
||||||
- Need ability to soft delete core entities
|
- Need ability to soft delete core entities
|
||||||
- Re-ordering of modules in panes
|
|
||||||
- Drag and Drop modules
|
- Drag and Drop modules
|
||||||
|
|
||||||
Upgrade
|
Upgrade
|
||||||
|
@ -42,9 +36,6 @@ Upgrade
|
||||||
- integrated store/catalog of extensions
|
- integrated store/catalog of extensions
|
||||||
- auto update - provide url to check for updates, perhaps even download in background - core and extensions
|
- auto update - provide url to check for updates, perhaps even download in background - core and extensions
|
||||||
|
|
||||||
Multi-Tenant
|
|
||||||
- Need ability to provision a new tenant DB
|
|
||||||
|
|
||||||
Database
|
Database
|
||||||
- Need ability to run on SQLite
|
- Need ability to run on SQLite
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user