From 6ab3d91a49730c9f8b2e7efa79297cf706ee114c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Mon, 11 Dec 2023 22:50:23 +0100 Subject: [PATCH 01/10] Adding Lombiq.LoginAsAnybody submodule with UI test --- .gitmodules | 4 ++ Lombiq.OSOCE.sln | 60 ++++++++++++++----- src/Lombiq.OSOCE.Web/Lombiq.OSOCE.Web.csproj | 1 + .../Recipes/Lombiq.OSOCE.Tests.recipe.json | 1 + src/Modules/Lombiq.LoginAsAnybody | 1 + .../Lombiq.OSOCE.Tests.UI.csproj | 1 + .../BehaviorLoginAsAnybodyTests.cs | 18 ++++++ 7 files changed, 71 insertions(+), 15 deletions(-) create mode 160000 src/Modules/Lombiq.LoginAsAnybody create mode 100644 test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs diff --git a/.gitmodules b/.gitmodules index af0e3c793..954d3808a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -96,3 +96,7 @@ [submodule "src/Modules/Lombiq.ContentEditors"] path = src/Modules/Lombiq.ContentEditors url = https://github.com/Lombiq/Orchard-Content-Editors.git +[submodule "src/Modules/Lombiq.LoginAsAnybody"] + path = src/Modules/Lombiq.LoginAsAnybody + url = https://github.com/Lombiq/Orchard-Login-as-Anybody + branch = dev diff --git a/Lombiq.OSOCE.sln b/Lombiq.OSOCE.sln index adcaf446d..590bb4ab8 100644 --- a/Lombiq.OSOCE.sln +++ b/Lombiq.OSOCE.sln @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .eslintrc.js = .eslintrc.js .gitignore = .gitignore + .prettierrc.js = .prettierrc.js .stylelintrc.js = .stylelintrc.js Directory.Build.props = Directory.Build.props License.md = License.md @@ -18,7 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution package.json = package.json Readme.md = Readme.md Reset-Local.ps1 = Reset-Local.ps1 - .prettierrc.js = .prettierrc.js EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{11E06A11-1733-408D-BB2F-BFA07075F812}" @@ -228,7 +228,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lombiq.Analyzers.Orchard1", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lombiq.Analyzers.VisualStudioExtension", "tools\Lombiq.Analyzers\Lombiq.Analyzers.VisualStudioExtension\Lombiq.Analyzers.VisualStudioExtension.csproj", "{7870C9C9-14CF-48EA-8379-7CA3D513A022}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lombiq.Hosting.Tenants.Management.Tests.UI", "src\Modules\Lombiq.Hosting.Tenants\Lombiq.Hosting.Tenants.Management.Tests.UI\Lombiq.Hosting.Tenants.Management.Tests.UI.csproj", "{C312CD69-7F9B-4430-B99F-CCF2D48A301A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lombiq.Hosting.Tenants.Management.Tests.UI", "src\Modules\Lombiq.Hosting.Tenants\Lombiq.Hosting.Tenants.Management.Tests.UI\Lombiq.Hosting.Tenants.Management.Tests.UI.csproj", "{C312CD69-7F9B-4430-B99F-CCF2D48A301A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lombiq.LoginAsAnybody.Tests.UI", "src\Modules\Lombiq.LoginAsAnybody\Lombiq.LoginAsAnybody.Tests.UI\Lombiq.LoginAsAnybody.Tests.UI.csproj", "{F29D71A8-417B-410B-82F6-0BCA254B2325}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lombiq.LoginAsAnybody", "src\Modules\Lombiq.LoginAsAnybody\Lombiq.LoginAsAnybody\Lombiq.LoginAsAnybody.csproj", "{E0B9B09C-0985-47DB-9F8A-79883547E1A9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1224,18 +1228,6 @@ Global {047F454E-8760-4F75-8519-32C9C2FE9F99}.Release|x64.Build.0 = Release|Any CPU {047F454E-8760-4F75-8519-32C9C2FE9F99}.Release|x86.ActiveCfg = Release|Any CPU {047F454E-8760-4F75-8519-32C9C2FE9F99}.Release|x86.Build.0 = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x64.ActiveCfg = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x64.Build.0 = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x86.ActiveCfg = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x86.Build.0 = Debug|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|Any CPU.Build.0 = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x64.ActiveCfg = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x64.Build.0 = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x86.ActiveCfg = Release|Any CPU - {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x86.Build.0 = Release|Any CPU {CDC5202B-EB66-4EE0-9FFC-A0B0FDA793E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CDC5202B-EB66-4EE0-9FFC-A0B0FDA793E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {CDC5202B-EB66-4EE0-9FFC-A0B0FDA793E8}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1272,6 +1264,42 @@ Global {7870C9C9-14CF-48EA-8379-7CA3D513A022}.Release|x64.Build.0 = Release|Any CPU {7870C9C9-14CF-48EA-8379-7CA3D513A022}.Release|x86.ActiveCfg = Release|Any CPU {7870C9C9-14CF-48EA-8379-7CA3D513A022}.Release|x86.Build.0 = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x64.ActiveCfg = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x64.Build.0 = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x86.ActiveCfg = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Debug|x86.Build.0 = Debug|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|Any CPU.Build.0 = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x64.ActiveCfg = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x64.Build.0 = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x86.ActiveCfg = Release|Any CPU + {C312CD69-7F9B-4430-B99F-CCF2D48A301A}.Release|x86.Build.0 = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|x64.ActiveCfg = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|x64.Build.0 = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|x86.ActiveCfg = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Debug|x86.Build.0 = Debug|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|Any CPU.Build.0 = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|x64.ActiveCfg = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|x64.Build.0 = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|x86.ActiveCfg = Release|Any CPU + {F29D71A8-417B-410B-82F6-0BCA254B2325}.Release|x86.Build.0 = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|x64.ActiveCfg = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|x64.Build.0 = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|x86.ActiveCfg = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Debug|x86.Build.0 = Debug|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|Any CPU.Build.0 = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|x64.ActiveCfg = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|x64.Build.0 = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|x86.ActiveCfg = Release|Any CPU + {E0B9B09C-0985-47DB-9F8A-79883547E1A9}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1370,10 +1398,12 @@ Global {890050AB-04F8-467A-81CB-8D83B4E61527} = {11E06A11-1733-408D-BB2F-BFA07075F812} {818CA6CB-ED8F-4396-AEBE-F69619C75DA7} = {6ED7E28F-0556-471C-8AD1-5BB0941411DD} {047F454E-8760-4F75-8519-32C9C2FE9F99} = {BF1EDFA5-0129-416C-B9ED-8CE68A3FD526} - {C312CD69-7F9B-4430-B99F-CCF2D48A301A} = {6ED7E28F-0556-471C-8AD1-5BB0941411DD} {CDC5202B-EB66-4EE0-9FFC-A0B0FDA793E8} = {BF1EDFA5-0129-416C-B9ED-8CE68A3FD526} {CC788E1F-E9C2-482E-BA10-9D3FFAA9CADD} = {BF1EDFA5-0129-416C-B9ED-8CE68A3FD526} {7870C9C9-14CF-48EA-8379-7CA3D513A022} = {BF1EDFA5-0129-416C-B9ED-8CE68A3FD526} + {C312CD69-7F9B-4430-B99F-CCF2D48A301A} = {6ED7E28F-0556-471C-8AD1-5BB0941411DD} + {F29D71A8-417B-410B-82F6-0BCA254B2325} = {6ED7E28F-0556-471C-8AD1-5BB0941411DD} + {E0B9B09C-0985-47DB-9F8A-79883547E1A9} = {11E06A11-1733-408D-BB2F-BFA07075F812} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C6926E60-1F5A-4B05-B835-B1021FBE07C5} diff --git a/src/Lombiq.OSOCE.Web/Lombiq.OSOCE.Web.csproj b/src/Lombiq.OSOCE.Web/Lombiq.OSOCE.Web.csproj index 879690b18..49f2a0a67 100644 --- a/src/Lombiq.OSOCE.Web/Lombiq.OSOCE.Web.csproj +++ b/src/Lombiq.OSOCE.Web/Lombiq.OSOCE.Web.csproj @@ -42,6 +42,7 @@ + diff --git a/src/Lombiq.OSOCE.Web/Recipes/Lombiq.OSOCE.Tests.recipe.json b/src/Lombiq.OSOCE.Web/Recipes/Lombiq.OSOCE.Tests.recipe.json index 1e49c89af..47c98cbd1 100644 --- a/src/Lombiq.OSOCE.Web/Recipes/Lombiq.OSOCE.Tests.recipe.json +++ b/src/Lombiq.OSOCE.Web/Recipes/Lombiq.OSOCE.Tests.recipe.json @@ -42,6 +42,7 @@ "Lombiq.Hosting.Tenants.IdleTenantManagement.ShutDownIdleTenants", "Lombiq.Hosting.Tenants.EmailQuotaManagement", "Lombiq.JsonEditor", + "Lombiq.LoginAsAnybody", "Lombiq.OSOCE.Samples", // We only enable these on a specific test, because it overlaps with too many things. // "Lombiq.Privacy.ConsentBanner", diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody new file mode 160000 index 000000000..d7c498b8c --- /dev/null +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -0,0 +1 @@ +Subproject commit d7c498b8cd28ecac093d37874c281d5250545dd2 diff --git a/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj b/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj index ebc4b460d..bfa4fc0c8 100644 --- a/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj +++ b/test/Lombiq.OSOCE.Tests.UI/Lombiq.OSOCE.Tests.UI.csproj @@ -34,6 +34,7 @@ + diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs new file mode 100644 index 000000000..8c442144f --- /dev/null +++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs @@ -0,0 +1,18 @@ +using Lombiq.LoginAsAnybody.Tests.UI.Extensions; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace Lombiq.OSOCE.Tests.UI.Tests.ModuleTests; + +public class BehaviorLoginAsAnybodyTests : UITestBase +{ + public BehaviorLoginAsAnybodyTests(ITestOutputHelper testOutputHelper) + : base(testOutputHelper) + { + } + + [Fact] + public Task SwitchingUserShouldWorkCorrectly() => + ExecuteTestAfterSetupAsync(context => context.TestLoginAsAnybodyAsync()); +} From 398612aa3a59a1edb5819968f24986fb4607a7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Tue, 12 Dec 2023 14:42:37 +0100 Subject: [PATCH 02/10] Updating Lombiq.LoginAsAnybody --- src/Modules/Lombiq.LoginAsAnybody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index d7c498b8c..5f801855f 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit d7c498b8cd28ecac093d37874c281d5250545dd2 +Subproject commit 5f801855f7a1a15bf691dd112923be9206b7ec08 From 1fb47f7f60f810d97dab068432657d9ea3fdb6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Tue, 12 Dec 2023 14:54:57 +0100 Subject: [PATCH 03/10] Updating Lombiq.LoginAsAnybody Readme --- src/Modules/Lombiq.LoginAsAnybody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index 5f801855f..2339aecec 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit 5f801855f7a1a15bf691dd112923be9206b7ec08 +Subproject commit 2339aecec0a050917ffa3beed4a4dad79a4fd593 From bfaacf0d1165053bb316166a34ac91e2c21c0e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Tue, 19 Dec 2023 18:36:49 +0100 Subject: [PATCH 04/10] Updating Lombiq.LoginAsAnybody and Readme --- Readme.md | 1 + src/Modules/Lombiq.LoginAsAnybody | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 8bcd6ffce..49f4a2a03 100644 --- a/Readme.md +++ b/Readme.md @@ -53,6 +53,7 @@ Note that this solution also has an Orchard 1 counterpart, [Lombiq's Open-Source - [`Lombiq.TrainingDemo`](https://github.com/Lombiq/Orchard-Training-Demo-Module): Demo Orchard Core module for training purposes guiding you to become an Orchard developer. Note that this module also has an Orchard 1.x version in the [`dev-orchard-1` branch of the repository](https://github.com/Lombiq/Orchard-Training-Demo-Module/tree/dev-orchard-1). If you prefer tutorial videos more then check out the [Dojo Course 3, the complete Orchard Core tutorial series](https://orcharddojo.net/orchard-training/dojo-course-3-the-full-orchard-core-tutorial). - [`Lombiq.UIKit`](https://github.com/Lombiq/Orchard-UIKit): This module contains reusable shapes like text editors, custom-style checkboxes, dropdown editors, and in the future potentially more complex editors. [Here](https://www.youtube.com/watch?v=PONfn2K8AHg) you can also see a demo of it. - [`Lombiq.VueJs`](https://github.com/Lombiq/Orchard-Vue.js): [Orchard Core](https://orchardproject.net/) module that contains [Vue.js](https://vuejs.org/) and commonly used Vue.js components to be used in other Vue.js apps as dependencies. Provides extensibility to create Vue.js component templates as Orchard Core shapes making them able to override in themes or modules. + - [`Lombiq.LoginAsAnybody`](https://github.com/Lombiq/Orchard-Login-as-Anybody): With the help of this module, a user with the site owner permission can log in as anybody on the admin dashboard. - Themes - [`Lombiq.BaseTheme`](https://github.com/Lombiq/Orchard-Base-Theme): This theme contains infrastructure for custom Bootstrap 5 themes with standardized zones and built-in front end menu display. diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index 2339aecec..fc9d3a579 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit 2339aecec0a050917ffa3beed4a4dad79a4fd593 +Subproject commit fc9d3a579c9614cbe14b4b6e68c4bbaeb8ddc9e5 From 04468400a578fe8c20a06e529e23bc453bc6adb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Tue, 19 Dec 2023 21:16:02 +0100 Subject: [PATCH 05/10] Adding new test for permission checking --- src/Modules/Lombiq.LoginAsAnybody | 2 +- .../Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index fc9d3a579..061566223 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit fc9d3a579c9614cbe14b4b6e68c4bbaeb8ddc9e5 +Subproject commit 0615662232ee30d6ac8afad54245ee19aa17fb45 diff --git a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs index 8c442144f..053ebc53a 100644 --- a/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs +++ b/test/Lombiq.OSOCE.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs @@ -15,4 +15,10 @@ public BehaviorLoginAsAnybodyTests(ITestOutputHelper testOutputHelper) [Fact] public Task SwitchingUserShouldWorkCorrectly() => ExecuteTestAfterSetupAsync(context => context.TestLoginAsAnybodyAsync()); + + [Fact] + public Task PermissionCheckShouldWorkCorrectly() => + ExecuteTestAfterSetupAsync( + context => context.TestLoginAsAnybodyAuthorizationAsync(), + changeConfiguration: Configurations.IgnoreUnauthorizedBrowserLogEntries); } From 961f02927386aef486d020b8c21ad4dd1191e590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Wed, 20 Dec 2023 19:33:09 +0100 Subject: [PATCH 06/10] Alphabetical order --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 49f4a2a03..73df228ca 100644 --- a/Readme.md +++ b/Readme.md @@ -48,12 +48,12 @@ Note that this solution also has an Orchard 1 counterpart, [Lombiq's Open-Source - [`Lombiq.Hosting.Tenants.IdleTenantManagement`](https://github.com/Lombiq/Hosting-Tenants/tree/dev/Lombiq.Hosting.Tenants.IdleTenantManagement): With the help of this module, you can ensure that any tenant where the feature is enabled will shutdown after a preset time is elapsed. This can be used to free up resources. - [`Lombiq.Hosting.Tenants.EnvironmentRobots`](https://github.com/Lombiq/Hosting-Tenants/tree/dev/Lombiq.Hosting.Tenants.EnvironmentRobots): With the help of this module, you can ensure that your sites will not be indexed by search bots. Check out a demo video of this module [here](https://youtu.be/Rp3ao2ZbNRs). - [`Lombiq.JsonEditor`](https://github.com/Lombiq/Orchard-JSON-Editor): Orchard Core module for displaying a JSON Editor like on [jsoneditoronline.org](https://jsoneditoronline.org/). Watch a demo video of it from the Orchard Community Meeting [here](https://www.youtube.com/watch?app=desktop&v=nFhRjhXTKAY). + - [`Lombiq.LoginAsAnybody`](https://github.com/Lombiq/Orchard-Login-as-Anybody): With the help of this module, a user with the site owner permission can log in as anybody on the admin dashboard. - [`Lombiq.OSOCE.Samples`](https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/tree/dev/src/Modules/Lombiq.OSOCE.Samples): This is a placeholder module that will contain sample code for UI tests and demonstration content for our open-source Orchard Core extensions. - [`Lombiq.Privacy`](https://github.com/Lombiq/Orchard-Privacy): Orchard module containing features related to data protection/privacy and the EU law on it, the [General Data Protection Regulation](https://eur-lex.europa.eu/legal-content/EN/TXT/?qid=1462439808430&uri=CELEX:32016R0679) (GDPR). Check out a demo video of this module [here](https://www.youtube.com/watch?v=GnyYL9Zdo8Q). **Important!** Using this module will not make your site GDPR-compliant alone. Do not forget to create a privacy policy page that you need to link to from the various consent-asking features. - [`Lombiq.TrainingDemo`](https://github.com/Lombiq/Orchard-Training-Demo-Module): Demo Orchard Core module for training purposes guiding you to become an Orchard developer. Note that this module also has an Orchard 1.x version in the [`dev-orchard-1` branch of the repository](https://github.com/Lombiq/Orchard-Training-Demo-Module/tree/dev-orchard-1). If you prefer tutorial videos more then check out the [Dojo Course 3, the complete Orchard Core tutorial series](https://orcharddojo.net/orchard-training/dojo-course-3-the-full-orchard-core-tutorial). - [`Lombiq.UIKit`](https://github.com/Lombiq/Orchard-UIKit): This module contains reusable shapes like text editors, custom-style checkboxes, dropdown editors, and in the future potentially more complex editors. [Here](https://www.youtube.com/watch?v=PONfn2K8AHg) you can also see a demo of it. - [`Lombiq.VueJs`](https://github.com/Lombiq/Orchard-Vue.js): [Orchard Core](https://orchardproject.net/) module that contains [Vue.js](https://vuejs.org/) and commonly used Vue.js components to be used in other Vue.js apps as dependencies. Provides extensibility to create Vue.js component templates as Orchard Core shapes making them able to override in themes or modules. - - [`Lombiq.LoginAsAnybody`](https://github.com/Lombiq/Orchard-Login-as-Anybody): With the help of this module, a user with the site owner permission can log in as anybody on the admin dashboard. - Themes - [`Lombiq.BaseTheme`](https://github.com/Lombiq/Orchard-Base-Theme): This theme contains infrastructure for custom Bootstrap 5 themes with standardized zones and built-in front end menu display. From 82c9ccb95ac79e7e0a6b5cbeb592471943b9e4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Wed, 20 Dec 2023 20:20:03 +0100 Subject: [PATCH 07/10] Adding test to NuGet solution --- .../Lombiq.OSOCE.NuGet.Web.csproj | 1 + .../Lombiq.OSOCE.NuGet.Tests.recipe.json | 1 + .../Lombiq.OSOCE.NuGet.Tests.UI.csproj | 1 + .../BehaviorLoginAsAnybodyTests.cs | 24 +++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs diff --git a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj index 7f103d42f..d619bcf91 100644 --- a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj +++ b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj @@ -44,6 +44,7 @@ + diff --git a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Recipes/Lombiq.OSOCE.NuGet.Tests.recipe.json b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Recipes/Lombiq.OSOCE.NuGet.Tests.recipe.json index 797a42928..262257cfa 100644 --- a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Recipes/Lombiq.OSOCE.NuGet.Tests.recipe.json +++ b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Recipes/Lombiq.OSOCE.NuGet.Tests.recipe.json @@ -38,6 +38,7 @@ "Lombiq.Hosting.Tenants.IdleTenantManagement.ShutDownIdleTenants", "Lombiq.Hosting.Tenants.Maintenance.ChangeUserSensitiveContent", "Lombiq.JsonEditor", + "Lombiq.LoginAsAnybody", "Lombiq.OSOCE.Samples", "Lombiq.OSOCE.NuGet.TestModule", // We only enable these in a specific test, because the banner overlaps with too many things. diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj index 6bea20471..966017283 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj @@ -31,6 +31,7 @@ + diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs new file mode 100644 index 000000000..1f6fcd084 --- /dev/null +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/ModuleTests/BehaviorLoginAsAnybodyTests.cs @@ -0,0 +1,24 @@ +using Lombiq.LoginAsAnybody.Tests.UI.Extensions; +using System.Threading.Tasks; +using Xunit; +using Xunit.Abstractions; + +namespace Lombiq.OSOCE.NuGet.Tests.UI.Tests.ModuleTests; + +public class BehaviorLoginAsAnybodyTests : UITestBase +{ + public BehaviorLoginAsAnybodyTests(ITestOutputHelper testOutputHelper) + : base(testOutputHelper) + { + } + + [Fact] + public Task SwitchingUserShouldWorkCorrectly() => + ExecuteTestAfterSetupAsync(context => context.TestLoginAsAnybodyAsync()); + + [Fact] + public Task PermissionCheckShouldWorkCorrectly() => + ExecuteTestAfterSetupAsync( + context => context.TestLoginAsAnybodyAuthorizationAsync(), + changeConfiguration: Configurations.IgnoreUnauthorizedBrowserLogEntries); +} From b7556b717420e3f17e390ba7bf3b394741b7f481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Wed, 20 Dec 2023 20:36:41 +0100 Subject: [PATCH 08/10] Updating Lombiq.LoginAsAnybody with updated NuGet version shield in readme --- src/Modules/Lombiq.LoginAsAnybody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index 061566223..8d324c383 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit 0615662232ee30d6ac8afad54245ee19aa17fb45 +Subproject commit 8d324c383ebc32753ca1e43aefb40e3e2667a920 From 70cbc3eca3ea43010c700a00299b9ac2588ae132 Mon Sep 17 00:00:00 2001 From: Szabolcs Deme Date: Thu, 21 Dec 2023 18:30:11 +0100 Subject: [PATCH 09/10] Updating Lombiq.LoginAsAnybody to latest dev --- src/Modules/Lombiq.LoginAsAnybody | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/Lombiq.LoginAsAnybody b/src/Modules/Lombiq.LoginAsAnybody index 8d324c383..c82355a70 160000 --- a/src/Modules/Lombiq.LoginAsAnybody +++ b/src/Modules/Lombiq.LoginAsAnybody @@ -1 +1 @@ -Subproject commit 8d324c383ebc32753ca1e43aefb40e3e2667a920 +Subproject commit c82355a7001cc84520ccfafbe0752e086c0ac8cf From 9c447fd180b2d10fda60f36bf8ce63625833aaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20M=C3=A1t=C3=A9?= Date: Thu, 21 Dec 2023 18:56:07 +0100 Subject: [PATCH 10/10] Updating NuGet version --- .../src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj | 2 +- .../Lombiq.OSOCE.NuGet.Tests.UI.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj index d619bcf91..a87c4f160 100644 --- a/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj +++ b/NuGetTest/src/Lombiq.OSOCE.NuGet.Web/Lombiq.OSOCE.NuGet.Web.csproj @@ -44,7 +44,7 @@ - + diff --git a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj index 966017283..7d4ae6d82 100644 --- a/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj +++ b/NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Lombiq.OSOCE.NuGet.Tests.UI.csproj @@ -31,7 +31,7 @@ - +