From 2720d97c90bb10061bf9207c5d05865ef899c80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Akan=20Edling?= Date: Wed, 26 Aug 2020 11:08:14 +0200 Subject: [PATCH] Updated manager reference. Added permissions example, fixes #35 --- nuspec/Piranha.Templates.nuspec | 2 +- src/empty/Empty.csproj | 2 +- src/empty/Startup.cs | 10 ++++++++++ src/module/TemplateModule.csproj | 2 +- src/web/mvc/MvcWeb.csproj | 2 +- src/web/mvc/Startup.cs | 10 ++++++++++ src/web/razor/RazorWeb.csproj | 2 +- src/web/razor/Startup.cs | 10 ++++++++++ 8 files changed, 35 insertions(+), 5 deletions(-) diff --git a/nuspec/Piranha.Templates.nuspec b/nuspec/Piranha.Templates.nuspec index 611bd77..0769ad8 100644 --- a/nuspec/Piranha.Templates.nuspec +++ b/nuspec/Piranha.Templates.nuspec @@ -2,7 +2,7 @@ Piranha.Templates - 8.4.2 + 8.4.3 Piranha CMS Templates Piranha CMS Piranha CMS diff --git a/src/empty/Empty.csproj b/src/empty/Empty.csproj index 0d41d42..f52400c 100644 --- a/src/empty/Empty.csproj +++ b/src/empty/Empty.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/empty/Startup.cs b/src/empty/Startup.cs index ec44a10..c7e8b53 100644 --- a/src/empty/Startup.cs +++ b/src/empty/Startup.cs @@ -73,6 +73,16 @@ public void ConfigureServices(IServiceCollection services) options.UseIdentityWithSeed(db => db.UseSqlite(_config.GetConnectionString("piranha"))); #endif + + /*** + * Here you can configure the different permissions + * that you want to use for securing content in the + * application. + options.UseSecurity(o => + { + o.UsePermission("WebUser", "Web User"); + }); + */ }); } diff --git a/src/module/TemplateModule.csproj b/src/module/TemplateModule.csproj index c7dc1cc..cddff3f 100644 --- a/src/module/TemplateModule.csproj +++ b/src/module/TemplateModule.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/web/mvc/MvcWeb.csproj b/src/web/mvc/MvcWeb.csproj index 0d41d42..f52400c 100644 --- a/src/web/mvc/MvcWeb.csproj +++ b/src/web/mvc/MvcWeb.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/web/mvc/Startup.cs b/src/web/mvc/Startup.cs index 665add5..0cab736 100644 --- a/src/web/mvc/Startup.cs +++ b/src/web/mvc/Startup.cs @@ -75,6 +75,16 @@ public void ConfigureServices(IServiceCollection services) options.UseIdentityWithSeed(db => db.UseSqlite(_config.GetConnectionString("piranha"))); #endif + + /*** + * Here you can configure the different permissions + * that you want to use for securing content in the + * application. + options.UseSecurity(o => + { + o.UsePermission("WebUser", "Web User"); + }); + */ }); } diff --git a/src/web/razor/RazorWeb.csproj b/src/web/razor/RazorWeb.csproj index 0d41d42..f52400c 100644 --- a/src/web/razor/RazorWeb.csproj +++ b/src/web/razor/RazorWeb.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/web/razor/Startup.cs b/src/web/razor/Startup.cs index d17b17d..841fb33 100644 --- a/src/web/razor/Startup.cs +++ b/src/web/razor/Startup.cs @@ -75,6 +75,16 @@ public void ConfigureServices(IServiceCollection services) options.UseIdentityWithSeed(db => db.UseSqlite(_config.GetConnectionString("piranha"))); #endif + + /*** + * Here you can configure the different permissions + * that you want to use for securing content in the + * application. + options.UseSecurity(o => + { + o.UsePermission("WebUser", "Web User"); + }); + */ }); }