From 00ce083a2c5d3d921470d3db7e0095024f14d632 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:11:28 -0400 Subject: [PATCH 1/9] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 180db82e..67b7fa0f 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,19 @@ Oqtane uses Blazor, an open source and cross-platform web UI framework for build Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** -**To get started with Oqtane:** +**To get started with Oqtane using the latest code:** 1. Install **[.NET Core 3.1 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**. 2. Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**. 3. Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution. - + +**To get started with Oqtane using an official release:** + +A detailed set of instructions for installing an official release of Oqtane on IIS is located here: +[Installing Oqtane on IIS](https://www.oqtane.org/Resources/Blog/PostId/542/installing-oqtane-on-iis) + NOTE: If you have already installed a previous version of Oqtane and you wish to do a clean database install, simply reset the DefaultConnection value in the Oqtane.Server\appsettings.json file to "". This will trigger a re-install when you run the application which will execute the database installation scripts. NOTE: If you want to submit pull requests make sure you install the [Github Extension For Visual Studio](https://visualstudio.github.com/). It is recommended you ignore any local changes you have made to the appsettings.json file before you submit a pull request. To automate this activity, open a command prompt and navigate to the /Oqtane.Server/ folder and enter the command "git update-index --skip-worktree appsettings.json" From 86517dd7935e63c5f4fe360cddb71be5c4645d46 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:13:07 -0400 Subject: [PATCH 2/9] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 67b7fa0f..9cc4a248 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,13 @@ Please note that this project is owned by the .NET Foundation and is governed by **To get started with Oqtane using an official release:** -A detailed set of instructions for installing an official release of Oqtane on IIS is located here: -[Installing Oqtane on IIS](https://www.oqtane.org/Resources/Blog/PostId/542/installing-oqtane-on-iis) +- A detailed set of instructions for installing an official release of Oqtane on IIS is located here: [Installing Oqtane on IIS](https://www.oqtane.org/Resources/Blog/PostId/542/installing-oqtane-on-iis) - NOTE: If you have already installed a previous version of Oqtane and you wish to do a clean database install, simply reset the DefaultConnection value in the Oqtane.Server\appsettings.json file to "". This will trigger a re-install when you run the application which will execute the database installation scripts. +**Additional Instructions** + +- If you have already installed a previous version of Oqtane and you wish to do a clean database install, simply reset the DefaultConnection value in the Oqtane.Server\appsettings.json file to "". This will trigger a re-install when you run the application which will execute the database installation scripts. - NOTE: If you want to submit pull requests make sure you install the [Github Extension For Visual Studio](https://visualstudio.github.com/). It is recommended you ignore any local changes you have made to the appsettings.json file before you submit a pull request. To automate this activity, open a command prompt and navigate to the /Oqtane.Server/ folder and enter the command "git update-index --skip-worktree appsettings.json" +- If you want to submit pull requests make sure you install the [Github Extension For Visual Studio](https://visualstudio.github.com/). It is recommended you ignore any local changes you have made to the appsettings.json file before you submit a pull request. To automate this activity, open a command prompt and navigate to the /Oqtane.Server/ folder and enter the command "git update-index --skip-worktree appsettings.json" # Roadmap This project is a work in progress and the schedule for implementing enhancements is dependent upon the availability of community members who are willing/able to assist. From 25918056cb3b0be944e1a8a91e17e9fd3bec496d Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:14:53 -0400 Subject: [PATCH 3/9] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9cc4a248..af206cc2 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,19 @@ Oqtane uses Blazor, an open source and cross-platform web UI framework for build Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** -**To get started with Oqtane using the latest code:** +# Getting Started - 1. Install **[.NET Core 3.1 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**. +**Using the latest code:** + +- Install **[.NET Core 3.1 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**. - 2. Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**. +- Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**. - 3. Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution. +- Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution. -**To get started with Oqtane using an official release:** +**Using an official release:** -- A detailed set of instructions for installing an official release of Oqtane on IIS is located here: [Installing Oqtane on IIS](https://www.oqtane.org/Resources/Blog/PostId/542/installing-oqtane-on-iis) +- A detailed set of instructions for installing Oqtane on IIS is located here: [Installing Oqtane on IIS](https://www.oqtane.org/Resources/Blog/PostId/542/installing-oqtane-on-iis) **Additional Instructions** From 457d1bb563f4a7f6055866a305026f1614bdac9f Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:17:34 -0400 Subject: [PATCH 4/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index af206cc2..299796fb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Oqtane is a Modular Application Framework for Blazor Oqtane uses Blazor, an open source and cross-platform web UI framework for building single-page apps using .NET and C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries. +Oqtane is being developed based on some fundamental principles which are outlined here [Oqtane Philosophy](https://www.oqtane.org/Resources/Blog/PostId/538/oqtane-philosophy). + Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** # Getting Started From c3f74a52178dc7a4c60999226a3575d79ab0ef94 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:18:06 -0400 Subject: [PATCH 5/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 299796fb..5bc6beaa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Oqtane is a Modular Application Framework for Blazor Oqtane uses Blazor, an open source and cross-platform web UI framework for building single-page apps using .NET and C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries. -Oqtane is being developed based on some fundamental principles which are outlined here [Oqtane Philosophy](https://www.oqtane.org/Resources/Blog/PostId/538/oqtane-philosophy). +Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/Resources/Blog/PostId/538/oqtane-philosophy). Please note that this project is owned by the .NET Foundation and is governed by the **[.NET Foundation Contributor Covenant Code of Conduct](https://dotnetfoundation.org/code-of-conduct)** From f14f927df731b4b25b3da56c7760e8230595e8d0 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Thu, 9 Jul 2020 10:19:20 -0400 Subject: [PATCH 6/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5bc6beaa..4d5072e9 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ Oqtane was created by [Shaun Walker](https://www.linkedin.com/in/shaunbrucewalke # Release Announcements +[Oqtane 1.0.1](https://www.oqtane.org/Resources/Blog/PostId/541/oqtane-builds-momentum-with-101-release) + [Oqtane 1.0](https://www.oqtane.org/Resources/Blog/PostId/540/announcing-oqtane-10-a-modular-application-framework-for-blazor) [Oqtane POC](https://www.oqtane.org/Resources/Blog/PostId/520/announcing-oqtane-a-modular-application-framework-for-blazor) From fe302aa9e4a7e0a1ab74b4545a09ba730a87ae91 Mon Sep 17 00:00:00 2001 From: Mike Casas Date: Sun, 12 Jul 2020 18:59:20 -0400 Subject: [PATCH 7/9] Should be moduleid as the entity id is added in the CreateAuthPolicyUrl method. --- .../Templates/External/Client/Services/[Module]Service.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs index 5fe282e6..f3443ebe 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs @@ -33,7 +33,7 @@ namespace [Owner].[Module]s.Services public async Task<[Module]> Add[Module]Async([Module] [Module]) { - return await PostJsonAsync<[Module]>(CreateAuthPolicyUrl($"{Apiurl}?entityid={[Module].ModuleId}", [Module].ModuleId), [Module]); + return await PostJsonAsync<[Module]>(CreateAuthPolicyUrl($"{Apiurl}?moduleid={[Module].ModuleId}", [Module].ModuleId), [Module]); } public async Task<[Module]> Update[Module]Async([Module] [Module]) From 23e7f66188a55cbc86f951f3cb82a782e081ce4b Mon Sep 17 00:00:00 2001 From: Mike Casas Date: Tue, 14 Jul 2020 11:47:59 -0400 Subject: [PATCH 8/9] Delete module id as it is getting added in CreateAuthPolicyUrl method. --- .../Templates/External/Client/Services/[Module]Service.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs index f3443ebe..0ab2bf8d 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Services/[Module]Service.cs @@ -33,7 +33,7 @@ namespace [Owner].[Module]s.Services public async Task<[Module]> Add[Module]Async([Module] [Module]) { - return await PostJsonAsync<[Module]>(CreateAuthPolicyUrl($"{Apiurl}?moduleid={[Module].ModuleId}", [Module].ModuleId), [Module]); + return await PostJsonAsync<[Module]>(CreateAuthPolicyUrl($"{Apiurl}", [Module].ModuleId), [Module]); } public async Task<[Module]> Update[Module]Async([Module] [Module]) From 807252c9e5b3e9c38a2aed1c2850f81d80730ecc Mon Sep 17 00:00:00 2001 From: Alexander Hendel Date: Wed, 15 Jul 2020 16:09:19 +0200 Subject: [PATCH 9/9] Fix directory separator for path operations --- Oqtane.Server/Controllers/FileController.cs | 4 ++-- Oqtane.Server/Controllers/FolderController.cs | 5 +++-- Oqtane.Server/Controllers/ModuleDefinitionController.cs | 6 +++--- Oqtane.Server/Controllers/UserController.cs | 5 +++-- Oqtane.Server/Infrastructure/DatabaseManager.cs | 4 ++-- .../Infrastructure/SiteTemplates/DefaultSiteTemplate.cs | 2 +- Oqtane.Server/Repository/SiteRepository.cs | 2 +- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Oqtane.Server/Controllers/FileController.cs b/Oqtane.Server/Controllers/FileController.cs index 5d77254b..f03e52c3 100644 --- a/Oqtane.Server/Controllers/FileController.cs +++ b/Oqtane.Server/Controllers/FileController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; @@ -483,7 +483,7 @@ namespace Oqtane.Controllers string[] folders = folderpath.Split(separators, StringSplitOptions.RemoveEmptyEntries); foreach (string folder in folders) { - path = Utilities.PathCombine(path, folder, "\\"); + path = Utilities.PathCombine(path, folder, Path.DirectorySeparatorChar.ToString()); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); diff --git a/Oqtane.Server/Controllers/FolderController.cs b/Oqtane.Server/Controllers/FolderController.cs index ebaaa590..9564734c 100644 --- a/Oqtane.Server/Controllers/FolderController.cs +++ b/Oqtane.Server/Controllers/FolderController.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.IO; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; using Oqtane.Models; @@ -112,7 +113,7 @@ namespace Oqtane.Controllers Folder parent = _folders.GetFolder(folder.ParentId.Value); folder.Path = Utilities.PathCombine(parent.Path, folder.Name); } - folder.Path = Utilities.PathCombine(folder.Path, "\\"); + folder.Path = Utilities.PathCombine(folder.Path, Path.DirectorySeparatorChar.ToString()); folder = _folders.AddFolder(folder); _logger.Log(LogLevel.Information, this, LogFunction.Create, "Folder Added {Folder}", folder); } @@ -147,7 +148,7 @@ namespace Oqtane.Controllers Folder parent = _folders.GetFolder(folder.ParentId.Value); folder.Path = Utilities.PathCombine(parent.Path, folder.Name); } - folder.Path = Utilities.PathCombine(folder.Path, "\\"); + folder.Path = Utilities.PathCombine(folder.Path, Path.DirectorySeparatorChar.ToString()); folder = _folders.UpdateFolder(folder); _logger.Log(LogLevel.Information, this, LogFunction.Update, "Folder Updated {Folder}", folder); } diff --git a/Oqtane.Server/Controllers/ModuleDefinitionController.cs b/Oqtane.Server/Controllers/ModuleDefinitionController.cs index 1cc77990..e49a8b79 100644 --- a/Oqtane.Server/Controllers/ModuleDefinitionController.cs +++ b/Oqtane.Server/Controllers/ModuleDefinitionController.cs @@ -170,17 +170,17 @@ namespace Oqtane.Controllers { string rootPath; DirectoryInfo rootFolder = Directory.GetParent(_environment.ContentRootPath); - string templatePath = Utilities.PathCombine(_environment.WebRootPath, "Modules", "Templates", moduleDefinition.Template,"\\"); + string templatePath = Utilities.PathCombine(_environment.WebRootPath, "Modules", "Templates", moduleDefinition.Template,Path.DirectorySeparatorChar.ToString()); if (moduleDefinition.Template == "internal") { - rootPath = Utilities.PathCombine(rootFolder.FullName,"\\"); + rootPath = Utilities.PathCombine(rootFolder.FullName,Path.DirectorySeparatorChar.ToString()); moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + "." + moduleDefinition.Name + "s, Oqtane.Client"; moduleDefinition.ServerManagerType = moduleDefinition.Owner + "." + moduleDefinition.Name + "s.Manager." + moduleDefinition.Name + "Manager, Oqtane.Server"; } else { - rootPath = Utilities.PathCombine(rootFolder.Parent.FullName , moduleDefinition.Owner + "." + moduleDefinition.Name + "s","\\"); + rootPath = Utilities.PathCombine(rootFolder.Parent.FullName , moduleDefinition.Owner + "." + moduleDefinition.Name + "s",Path.DirectorySeparatorChar.ToString()); moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + "." + moduleDefinition.Name + "s, " + moduleDefinition.Owner + "." + moduleDefinition.Name + "s.Client.Oqtane"; moduleDefinition.ServerManagerType = moduleDefinition.Owner + "." + moduleDefinition.Name + "s.Manager." + moduleDefinition.Name + "Manager, " + moduleDefinition.Owner + "." + moduleDefinition.Name + "s.Server.Oqtane"; } diff --git a/Oqtane.Server/Controllers/UserController.cs b/Oqtane.Server/Controllers/UserController.cs index d27694b4..7ce9d1e5 100644 --- a/Oqtane.Server/Controllers/UserController.cs +++ b/Oqtane.Server/Controllers/UserController.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Security.Claims; using Oqtane.Shared; using System; +using System.IO; using System.Net; using Oqtane.Enums; using Oqtane.Infrastructure; @@ -174,7 +175,7 @@ namespace Oqtane.Controllers } // add folder for user - Folder folder = _folders.GetFolder(user.SiteId, Utilities.PathCombine("Users","\\")); + Folder folder = _folders.GetFolder(user.SiteId, Utilities.PathCombine("Users",Path.DirectorySeparatorChar.ToString())); if (folder != null) { _folders.AddFolder(new Folder @@ -182,7 +183,7 @@ namespace Oqtane.Controllers SiteId = folder.SiteId, ParentId = folder.FolderId, Name = "My Folder", - Path = Utilities.PathCombine(folder.Path, newUser.UserId.ToString(),"\\"), + Path = Utilities.PathCombine(folder.Path, newUser.UserId.ToString(),Path.DirectorySeparatorChar.ToString()), Order = 1, IsSystem = true, Permissions = "[{\"PermissionName\":\"Browse\",\"Permissions\":\"[" + newUser.UserId.ToString() + "]\"},{\"PermissionName\":\"View\",\"Permissions\":\"All Users\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"[" + diff --git a/Oqtane.Server/Infrastructure/DatabaseManager.cs b/Oqtane.Server/Infrastructure/DatabaseManager.cs index 7a7cff0d..3ba6160b 100644 --- a/Oqtane.Server/Infrastructure/DatabaseManager.cs +++ b/Oqtane.Server/Infrastructure/DatabaseManager.cs @@ -461,7 +461,7 @@ namespace Oqtane.Infrastructure userroles.AddUserRole(userRole); // add user folder - var folder = folders.GetFolder(user.SiteId, Utilities.PathCombine("Users", "\\")); + var folder = folders.GetFolder(user.SiteId, Utilities.PathCombine("Users", Path.DirectorySeparatorChar.ToString())); if (folder != null) { folders.AddFolder(new Folder @@ -469,7 +469,7 @@ namespace Oqtane.Infrastructure SiteId = folder.SiteId, ParentId = folder.FolderId, Name = "My Folder", - Path = Utilities.PathCombine(folder.Path, user.UserId.ToString(), "\\"), + Path = Utilities.PathCombine(folder.Path, user.UserId.ToString(), Path.DirectorySeparatorChar.ToString()), Order = 1, IsSystem = true, Permissions = new List diff --git a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs index 4b56e443..811f77de 100644 --- a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs +++ b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs @@ -134,7 +134,7 @@ namespace Oqtane.SiteTemplates if (System.IO.File.Exists(Path.Combine(_environment.WebRootPath, "images", "logo-white.png"))) { - string folderpath = Utilities.PathCombine(_environment.ContentRootPath, "Content", "Tenants", site.TenantId.ToString(), "Sites", site.SiteId.ToString(),"\\"); + string folderpath = Utilities.PathCombine(_environment.ContentRootPath, "Content", "Tenants", site.TenantId.ToString(), "Sites", site.SiteId.ToString(), Path.DirectorySeparatorChar.ToString()); System.IO.Directory.CreateDirectory(folderpath); if (!System.IO.File.Exists(Path.Combine(folderpath, "logo-white.png"))) { diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index ae179abe..a0ea5aba 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -692,7 +692,7 @@ namespace Oqtane.Repository }); _folderRepository.AddFolder(new Folder { - SiteId = site.SiteId, ParentId = folder.FolderId, Name = "Users", Path = Utilities.PathCombine("Users","\\"), Order = 1, IsSystem = true, + SiteId = site.SiteId, ParentId = folder.FolderId, Name = "Users", Path = Utilities.PathCombine("Users",Path.DirectorySeparatorChar.ToString()), Order = 1, IsSystem = true, Permissions = "[{\"PermissionName\":\"Browse\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]" });