From ccce4ab40cfc0019d2d030b553d8dd0e2165e8c7 Mon Sep 17 00:00:00 2001 From: Phat Date: Tue, 1 Aug 2023 19:01:28 +0700 Subject: [PATCH 01/23] Move MixHeart into lvl0 folder --- src/Mixcore.sln | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Mixcore.sln b/src/Mixcore.sln index e357940af..09196b244 100644 --- a/src/Mixcore.sln +++ b/src/Mixcore.sln @@ -96,7 +96,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.graphql", "ser EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.mixdb.event", "platform\core\mix.mixdb.event\mix.mixdb.event.csproj", "{9508136B-0879-4BF2-B694-3B6242715BE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mixcore.gateway", "applications\mixcore.gateway\mixcore.gateway.csproj", "{B57EEC99-85CF-4C4E-BB10-929CCD1D3723}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mixcore.gateway", "applications\mixcore.gateway\mixcore.gateway.csproj", "{B57EEC99-85CF-4C4E-BB10-929CCD1D3723}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl0", "lvl0", "{147A1144-45E8-448A-9FD7-511C999E5727}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl1", "lvl1", "{0027B7D2-664D-4872-AE99-BA2A2BCA6B2E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lv2", "lv2", "{92F3CAD3-DBF4-4587-A14D-8DECE4077D0C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -231,6 +238,10 @@ Global {9508136B-0879-4BF2-B694-3B6242715BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.Build.0 = Release|Any CPU + {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -255,7 +266,7 @@ Global {CD0F866F-FF61-456B-AAEA-9960B17107E3} = {8D3FF4E3-4C56-4FA6-81CC-686DE037FF59} {80A478DE-09AD-4C60-B446-73946D8B0E51} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} {2E843175-B948-4D90-A11B-415EE67D9E1A} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {D4938E22-22C3-4364-A710-557B63954B5E} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} + {D4938E22-22C3-4364-A710-557B63954B5E} = {147A1144-45E8-448A-9FD7-511C999E5727} {2D254550-CE54-43A2-8AE9-FAA72F2C0FD6} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} {94790DB1-AC71-48BF-8665-D04C86064231} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} {34A92D4D-B94A-4674-BBA4-8D2F80BECCB6} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} @@ -278,6 +289,9 @@ Global {4C1341A9-F5E2-4AB1-A504-5D815CAEEAF3} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} {4C7CFA3D-355B-434F-8442-2B0970BF02C5} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} {9508136B-0879-4BF2-B694-3B6242715BE7} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} + {147A1144-45E8-448A-9FD7-511C999E5727} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} + {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} + {92F3CAD3-DBF4-4587-A14D-8DECE4077D0C} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0143C230-7F40-44B2-8BA3-EF5B92D55848} From 6ba3ce523c113a3cfde8130fdb2d30896eaa8576 Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Tue, 1 Aug 2023 22:49:44 +0700 Subject: [PATCH 02/23] Create dotnet.yml --- .github/workflows/dotnet.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 000000000..f924e09b4 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,28 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal From 7171715aa7ceea35aba306785af1c59b82ac21c8 Mon Sep 17 00:00:00 2001 From: Phat Date: Tue, 1 Aug 2023 22:51:38 +0700 Subject: [PATCH 03/23] Add projects --- Mixcore.sln | 309 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 Mixcore.sln diff --git a/Mixcore.sln b/Mixcore.sln new file mode 100644 index 000000000..a0f1dcf22 --- /dev/null +++ b/Mixcore.sln @@ -0,0 +1,309 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{47325727-2298-4AB1-BD62-DBC936CF428E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl0", "lvl0", "{3E4D0079-0022-44E5-9E80-CDD144BC1FCA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl1", "lvl1", "{90457F11-3B92-4B45-B17B-02C1D5ABEA67}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl2", "lvl2", "{2A258019-B49F-4707-9B5B-B09C4C63672B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mix.Heart", "src\platform\core\mix-heart\src\Mix.Heart\Mix.Heart.csproj", "{C2A0785F-3951-402F-B7B9-B55E1393BFFA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.mixdb.event", "src\platform\core\mix.mixdb.event\mix.mixdb.event.csproj", "{FBBC06C8-C708-40FE-8E3E-570CDF0571B7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.communicator", "src\platform\mix.communicator\mix.communicator.csproj", "{5A68F6D1-4D0A-4D02-A955-E7BFF468B361}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.constant", "src\platform\mix.constant\mix.constant.csproj", "{AD5E729D-2770-4642-B498-5B9769ECD994}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.database", "src\platform\mix.database\mix.database.csproj", "{CB3C4074-8237-47FA-9609-B0C6E3B355C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.identity", "src\platform\mix.identity\mix.identity.csproj", "{38643BAE-3E8F-4B9F-A089-481F3E2C180B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.library", "src\platform\mix.library\mix.library.csproj", "{D60F1D8E-D8C3-4642-A47F-4B83D7F357EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.quartz", "src\platform\mix.quartz\mix.quartz.csproj", "{F91122E6-0365-4292-9F7B-4EEB328F3270}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.queue", "src\platform\mix.queue\mix.queue.csproj", "{D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.repodb", "src\platform\mix.repodb\mix.repodb.csproj", "{5AA3A18E-6699-4D6B-A1D2-66CFDD58B967}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.service", "src\platform\mix.service\mix.service.csproj", "{DF131176-9D77-4062-B956-BC8E0ED5E80E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.shared", "src\platform\mix.shared\mix.shared.csproj", "{7393C927-87B5-4C4F-8754-2A512FEECAF7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.signalr", "src\platform\mix.signalr\mix.signalr.csproj", "{68238647-A2E8-458D-9AC2-CEDD4C20BEC2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.signalr.hub", "src\platform\mix.signalr.hub\mix.signalr.hub.csproj", "{6A194401-B302-4C56-BE4B-D7B46871916E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.storage.lib", "src\platform\mix.storage.lib\mix.storage.lib.csproj", "{56811C51-138B-4A47-9BDA-FF45C659B63D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{01CE08D9-DCC9-43BF-B817-8DC3CEA64EA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.xunittest", "src\test\mix.xunittest\mix.xunittest.csproj", "{31514114-264C-439D-A94E-9F0EBA8ECAEC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution items", "{7E45E45E-FF8B-43EF-82E8-74B15BBF3784}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + .gitmodules = .gitmodules + README.md = README.md + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.ecommerce.lib", "src\services\ecommerces\mix.services.ecommerce.lib\mix.services.ecommerce.lib.csproj", "{5E68E2A9-F439-4774-9244-F278E6D86DC3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.graphql.lib", "src\services\graphql\mix.services.graphql.lib\mix.services.graphql.lib.csproj", "{6350C7EC-4542-4290-97E2-88266C20B8AE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.databases.lib", "src\services\mix-databases\mix.services.databases.lib\mix.services.databases.lib.csproj", "{52009EFD-A7B5-4575-8CA9-909820D8A8DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.databases", "src\services\mix-databases\mix.servives.databases\mix.services.databases.csproj", "{448955C7-54E2-4977-BB36-B6B412628FA3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.ecommerce", "src\services\ecommerces\mix.services.ecommerce\mix.services.ecommerce.csproj", "{B2765C23-A51F-43BE-B5B4-58FC42919725}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.graphql", "src\services\graphql\mix.services.graphql\mix.services.graphql.csproj", "{C90B18E9-F66C-4A46-9863-6336433F84F3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl3", "lvl3", "{2E82701B-B905-43F9-98A0-E15C11540B96}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.account", "src\modules\mix.account\mix.account.csproj", "{EC4DDA68-9968-4655-8378-F9E03DBB4E01}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.common", "src\modules\mix.common\mix.common.csproj", "{4CC16B18-C374-4EA4-9ECC-77B568B443D2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.grpc", "src\modules\mix.grpc\mix.grpc.csproj", "{9110AF75-EBB8-40D5-B82E-5695AA4CB45F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.messenger", "src\modules\mix.messenger\mix.messenger.csproj", "{C5C93238-7AFF-488C-9E3F-D246C197B176}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.portal", "src\modules\mix.portal\mix.portal.csproj", "{0D405472-E13A-4277-B6D2-2ADE478189E3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.storage", "src\modules\mix.storage\mix.storage.csproj", "{DE2C1D58-26CC-4C41-B690-B0D34153BEA0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.tenancy", "src\modules\mix.tenancy\mix.tenancy.csproj", "{DB1EADFC-2FE1-4797-A751-00A4952C1B9A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.scheduler", "src\modules\mix.scheduler\mix.scheduler.csproj", "{04557166-482F-43B7-9F97-F8C3CD12E984}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mixcore", "src\applications\Mixcore\mixcore.csproj", "{5492ED63-B88D-4A04-BB76-339C094F85CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mixcore.gateway", "src\applications\mixcore.gateway\mixcore.gateway.csproj", "{B8B22A0B-8165-4BD3-9A56-E88353473E21}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{51E5A1BD-75AD-42BC-9220-F0C016A62216}" + ProjectSection(SolutionItems) = preProject + src\shared\MixContent\default.zip = src\shared\MixContent\default.zip + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "configurations", "configurations", "{F00C1402-7FB5-46D9-98A9-0A846C738130}" + ProjectSection(SolutionItems) = preProject + src\shared\MixContent\Shared\AppConfigs\authentication.json = src\shared\MixContent\Shared\AppConfigs\authentication.json + src\shared\MixContent\Shared\AppConfigs\azure.json = src\shared\MixContent\Shared\AppConfigs\azure.json + src\shared\MixContent\Shared\AppConfigs\configuration.json = src\shared\MixContent\Shared\AppConfigs\configuration.json + src\shared\MixContent\Shared\AppConfigs\database.json = src\shared\MixContent\Shared\AppConfigs\database.json + src\shared\MixContent\Shared\AppConfigs\endpoint.json = src\shared\MixContent\Shared\AppConfigs\endpoint.json + src\shared\MixContent\Shared\AppConfigs\epplus.json = src\shared\MixContent\Shared\AppConfigs\epplus.json + src\shared\MixContent\Shared\AppConfigs\global.json = src\shared\MixContent\Shared\AppConfigs\global.json + src\shared\MixContent\Shared\AppConfigs\google_credential.json = src\shared\MixContent\Shared\AppConfigs\google_credential.json + src\shared\MixContent\Shared\AppConfigs\google_firebase.json = src\shared\MixContent\Shared\AppConfigs\google_firebase.json + src\shared\MixContent\Shared\AppConfigs\ip_security.json = src\shared\MixContent\Shared\AppConfigs\ip_security.json + src\shared\MixContent\Shared\AppConfigs\log.json = src\shared\MixContent\Shared\AppConfigs\log.json + src\shared\MixContent\Shared\AppConfigs\mix_heart.json = src\shared\MixContent\Shared\AppConfigs\mix_heart.json + src\shared\MixContent\Shared\AppConfigs\ocelot.json = src\shared\MixContent\Shared\AppConfigs\ocelot.json + src\shared\MixContent\Shared\AppConfigs\payments.json = src\shared\MixContent\Shared\AppConfigs\payments.json + src\shared\MixContent\Shared\AppConfigs\portal.json = src\shared\MixContent\Shared\AppConfigs\portal.json + src\shared\MixContent\Shared\AppConfigs\quartz.json = src\shared\MixContent\Shared\AppConfigs\quartz.json + src\shared\MixContent\Shared\AppConfigs\queue.json = src\shared\MixContent\Shared\AppConfigs\queue.json + src\shared\MixContent\Shared\AppConfigs\rate_limit.json = src\shared\MixContent\Shared\AppConfigs\rate_limit.json + src\shared\MixContent\Shared\AppConfigs\redis.json = src\shared\MixContent\Shared\AppConfigs\redis.json + src\shared\MixContent\Shared\AppConfigs\smtp.json = src\shared\MixContent\Shared\AppConfigs\smtp.json + src\shared\MixContent\Shared\AppConfigs\storage.json = src\shared\MixContent\Shared\AppConfigs\storage.json + src\shared\MixContent\Shared\AppConfigs\translator.json = src\shared\MixContent\Shared\AppConfigs\translator.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{999A959B-80CB-427A-BC09-A52E26B5A6DD}" + ProjectSection(SolutionItems) = preProject + src\shared\MixContent\Templates\_ViewImports.cshtml = src\shared\MixContent\Templates\_ViewImports.cshtml + src\shared\MixContent\Templates\_ViewStart.cshtml = src\shared\MixContent\Templates\_ViewStart.cshtml + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C2A0785F-3951-402F-B7B9-B55E1393BFFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2A0785F-3951-402F-B7B9-B55E1393BFFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2A0785F-3951-402F-B7B9-B55E1393BFFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2A0785F-3951-402F-B7B9-B55E1393BFFA}.Release|Any CPU.Build.0 = Release|Any CPU + {FBBC06C8-C708-40FE-8E3E-570CDF0571B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBBC06C8-C708-40FE-8E3E-570CDF0571B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBBC06C8-C708-40FE-8E3E-570CDF0571B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBBC06C8-C708-40FE-8E3E-570CDF0571B7}.Release|Any CPU.Build.0 = Release|Any CPU + {5A68F6D1-4D0A-4D02-A955-E7BFF468B361}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A68F6D1-4D0A-4D02-A955-E7BFF468B361}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A68F6D1-4D0A-4D02-A955-E7BFF468B361}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A68F6D1-4D0A-4D02-A955-E7BFF468B361}.Release|Any CPU.Build.0 = Release|Any CPU + {AD5E729D-2770-4642-B498-5B9769ECD994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD5E729D-2770-4642-B498-5B9769ECD994}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD5E729D-2770-4642-B498-5B9769ECD994}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD5E729D-2770-4642-B498-5B9769ECD994}.Release|Any CPU.Build.0 = Release|Any CPU + {CB3C4074-8237-47FA-9609-B0C6E3B355C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB3C4074-8237-47FA-9609-B0C6E3B355C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB3C4074-8237-47FA-9609-B0C6E3B355C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB3C4074-8237-47FA-9609-B0C6E3B355C4}.Release|Any CPU.Build.0 = Release|Any CPU + {38643BAE-3E8F-4B9F-A089-481F3E2C180B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38643BAE-3E8F-4B9F-A089-481F3E2C180B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38643BAE-3E8F-4B9F-A089-481F3E2C180B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38643BAE-3E8F-4B9F-A089-481F3E2C180B}.Release|Any CPU.Build.0 = Release|Any CPU + {D60F1D8E-D8C3-4642-A47F-4B83D7F357EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D60F1D8E-D8C3-4642-A47F-4B83D7F357EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D60F1D8E-D8C3-4642-A47F-4B83D7F357EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D60F1D8E-D8C3-4642-A47F-4B83D7F357EF}.Release|Any CPU.Build.0 = Release|Any CPU + {F91122E6-0365-4292-9F7B-4EEB328F3270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F91122E6-0365-4292-9F7B-4EEB328F3270}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F91122E6-0365-4292-9F7B-4EEB328F3270}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F91122E6-0365-4292-9F7B-4EEB328F3270}.Release|Any CPU.Build.0 = Release|Any CPU + {D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17}.Release|Any CPU.Build.0 = Release|Any CPU + {5AA3A18E-6699-4D6B-A1D2-66CFDD58B967}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AA3A18E-6699-4D6B-A1D2-66CFDD58B967}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AA3A18E-6699-4D6B-A1D2-66CFDD58B967}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AA3A18E-6699-4D6B-A1D2-66CFDD58B967}.Release|Any CPU.Build.0 = Release|Any CPU + {DF131176-9D77-4062-B956-BC8E0ED5E80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF131176-9D77-4062-B956-BC8E0ED5E80E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF131176-9D77-4062-B956-BC8E0ED5E80E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF131176-9D77-4062-B956-BC8E0ED5E80E}.Release|Any CPU.Build.0 = Release|Any CPU + {7393C927-87B5-4C4F-8754-2A512FEECAF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7393C927-87B5-4C4F-8754-2A512FEECAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7393C927-87B5-4C4F-8754-2A512FEECAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7393C927-87B5-4C4F-8754-2A512FEECAF7}.Release|Any CPU.Build.0 = Release|Any CPU + {68238647-A2E8-458D-9AC2-CEDD4C20BEC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68238647-A2E8-458D-9AC2-CEDD4C20BEC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68238647-A2E8-458D-9AC2-CEDD4C20BEC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68238647-A2E8-458D-9AC2-CEDD4C20BEC2}.Release|Any CPU.Build.0 = Release|Any CPU + {6A194401-B302-4C56-BE4B-D7B46871916E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A194401-B302-4C56-BE4B-D7B46871916E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A194401-B302-4C56-BE4B-D7B46871916E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A194401-B302-4C56-BE4B-D7B46871916E}.Release|Any CPU.Build.0 = Release|Any CPU + {56811C51-138B-4A47-9BDA-FF45C659B63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {56811C51-138B-4A47-9BDA-FF45C659B63D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {56811C51-138B-4A47-9BDA-FF45C659B63D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {56811C51-138B-4A47-9BDA-FF45C659B63D}.Release|Any CPU.Build.0 = Release|Any CPU + {31514114-264C-439D-A94E-9F0EBA8ECAEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31514114-264C-439D-A94E-9F0EBA8ECAEC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31514114-264C-439D-A94E-9F0EBA8ECAEC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31514114-264C-439D-A94E-9F0EBA8ECAEC}.Release|Any CPU.Build.0 = Release|Any CPU + {5E68E2A9-F439-4774-9244-F278E6D86DC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E68E2A9-F439-4774-9244-F278E6D86DC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E68E2A9-F439-4774-9244-F278E6D86DC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E68E2A9-F439-4774-9244-F278E6D86DC3}.Release|Any CPU.Build.0 = Release|Any CPU + {6350C7EC-4542-4290-97E2-88266C20B8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6350C7EC-4542-4290-97E2-88266C20B8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6350C7EC-4542-4290-97E2-88266C20B8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6350C7EC-4542-4290-97E2-88266C20B8AE}.Release|Any CPU.Build.0 = Release|Any CPU + {52009EFD-A7B5-4575-8CA9-909820D8A8DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52009EFD-A7B5-4575-8CA9-909820D8A8DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52009EFD-A7B5-4575-8CA9-909820D8A8DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52009EFD-A7B5-4575-8CA9-909820D8A8DF}.Release|Any CPU.Build.0 = Release|Any CPU + {448955C7-54E2-4977-BB36-B6B412628FA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {448955C7-54E2-4977-BB36-B6B412628FA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {448955C7-54E2-4977-BB36-B6B412628FA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {448955C7-54E2-4977-BB36-B6B412628FA3}.Release|Any CPU.Build.0 = Release|Any CPU + {B2765C23-A51F-43BE-B5B4-58FC42919725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2765C23-A51F-43BE-B5B4-58FC42919725}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2765C23-A51F-43BE-B5B4-58FC42919725}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2765C23-A51F-43BE-B5B4-58FC42919725}.Release|Any CPU.Build.0 = Release|Any CPU + {C90B18E9-F66C-4A46-9863-6336433F84F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C90B18E9-F66C-4A46-9863-6336433F84F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C90B18E9-F66C-4A46-9863-6336433F84F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C90B18E9-F66C-4A46-9863-6336433F84F3}.Release|Any CPU.Build.0 = Release|Any CPU + {EC4DDA68-9968-4655-8378-F9E03DBB4E01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC4DDA68-9968-4655-8378-F9E03DBB4E01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC4DDA68-9968-4655-8378-F9E03DBB4E01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC4DDA68-9968-4655-8378-F9E03DBB4E01}.Release|Any CPU.Build.0 = Release|Any CPU + {4CC16B18-C374-4EA4-9ECC-77B568B443D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CC16B18-C374-4EA4-9ECC-77B568B443D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CC16B18-C374-4EA4-9ECC-77B568B443D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CC16B18-C374-4EA4-9ECC-77B568B443D2}.Release|Any CPU.Build.0 = Release|Any CPU + {9110AF75-EBB8-40D5-B82E-5695AA4CB45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9110AF75-EBB8-40D5-B82E-5695AA4CB45F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9110AF75-EBB8-40D5-B82E-5695AA4CB45F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9110AF75-EBB8-40D5-B82E-5695AA4CB45F}.Release|Any CPU.Build.0 = Release|Any CPU + {C5C93238-7AFF-488C-9E3F-D246C197B176}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5C93238-7AFF-488C-9E3F-D246C197B176}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5C93238-7AFF-488C-9E3F-D246C197B176}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5C93238-7AFF-488C-9E3F-D246C197B176}.Release|Any CPU.Build.0 = Release|Any CPU + {0D405472-E13A-4277-B6D2-2ADE478189E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D405472-E13A-4277-B6D2-2ADE478189E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D405472-E13A-4277-B6D2-2ADE478189E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D405472-E13A-4277-B6D2-2ADE478189E3}.Release|Any CPU.Build.0 = Release|Any CPU + {DE2C1D58-26CC-4C41-B690-B0D34153BEA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE2C1D58-26CC-4C41-B690-B0D34153BEA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE2C1D58-26CC-4C41-B690-B0D34153BEA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE2C1D58-26CC-4C41-B690-B0D34153BEA0}.Release|Any CPU.Build.0 = Release|Any CPU + {DB1EADFC-2FE1-4797-A751-00A4952C1B9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB1EADFC-2FE1-4797-A751-00A4952C1B9A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB1EADFC-2FE1-4797-A751-00A4952C1B9A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB1EADFC-2FE1-4797-A751-00A4952C1B9A}.Release|Any CPU.Build.0 = Release|Any CPU + {04557166-482F-43B7-9F97-F8C3CD12E984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04557166-482F-43B7-9F97-F8C3CD12E984}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04557166-482F-43B7-9F97-F8C3CD12E984}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04557166-482F-43B7-9F97-F8C3CD12E984}.Release|Any CPU.Build.0 = Release|Any CPU + {5492ED63-B88D-4A04-BB76-339C094F85CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5492ED63-B88D-4A04-BB76-339C094F85CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5492ED63-B88D-4A04-BB76-339C094F85CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5492ED63-B88D-4A04-BB76-339C094F85CF}.Release|Any CPU.Build.0 = Release|Any CPU + {B8B22A0B-8165-4BD3-9A56-E88353473E21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8B22A0B-8165-4BD3-9A56-E88353473E21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8B22A0B-8165-4BD3-9A56-E88353473E21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8B22A0B-8165-4BD3-9A56-E88353473E21}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} = {47325727-2298-4AB1-BD62-DBC936CF428E} + {90457F11-3B92-4B45-B17B-02C1D5ABEA67} = {47325727-2298-4AB1-BD62-DBC936CF428E} + {2A258019-B49F-4707-9B5B-B09C4C63672B} = {47325727-2298-4AB1-BD62-DBC936CF428E} + {C2A0785F-3951-402F-B7B9-B55E1393BFFA} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {FBBC06C8-C708-40FE-8E3E-570CDF0571B7} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {5A68F6D1-4D0A-4D02-A955-E7BFF468B361} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {AD5E729D-2770-4642-B498-5B9769ECD994} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {CB3C4074-8237-47FA-9609-B0C6E3B355C4} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {38643BAE-3E8F-4B9F-A089-481F3E2C180B} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {D60F1D8E-D8C3-4642-A47F-4B83D7F357EF} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {F91122E6-0365-4292-9F7B-4EEB328F3270} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {D5B879D1-CC79-4D9C-B2D4-79CFA8B7FA17} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {5AA3A18E-6699-4D6B-A1D2-66CFDD58B967} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {DF131176-9D77-4062-B956-BC8E0ED5E80E} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {7393C927-87B5-4C4F-8754-2A512FEECAF7} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {68238647-A2E8-458D-9AC2-CEDD4C20BEC2} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {6A194401-B302-4C56-BE4B-D7B46871916E} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {56811C51-138B-4A47-9BDA-FF45C659B63D} = {3E4D0079-0022-44E5-9E80-CDD144BC1FCA} + {31514114-264C-439D-A94E-9F0EBA8ECAEC} = {01CE08D9-DCC9-43BF-B817-8DC3CEA64EA4} + {5E68E2A9-F439-4774-9244-F278E6D86DC3} = {90457F11-3B92-4B45-B17B-02C1D5ABEA67} + {6350C7EC-4542-4290-97E2-88266C20B8AE} = {90457F11-3B92-4B45-B17B-02C1D5ABEA67} + {52009EFD-A7B5-4575-8CA9-909820D8A8DF} = {90457F11-3B92-4B45-B17B-02C1D5ABEA67} + {448955C7-54E2-4977-BB36-B6B412628FA3} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {B2765C23-A51F-43BE-B5B4-58FC42919725} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {C90B18E9-F66C-4A46-9863-6336433F84F3} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {2E82701B-B905-43F9-98A0-E15C11540B96} = {47325727-2298-4AB1-BD62-DBC936CF428E} + {EC4DDA68-9968-4655-8378-F9E03DBB4E01} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {4CC16B18-C374-4EA4-9ECC-77B568B443D2} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {9110AF75-EBB8-40D5-B82E-5695AA4CB45F} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {C5C93238-7AFF-488C-9E3F-D246C197B176} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {0D405472-E13A-4277-B6D2-2ADE478189E3} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {DE2C1D58-26CC-4C41-B690-B0D34153BEA0} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {DB1EADFC-2FE1-4797-A751-00A4952C1B9A} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {04557166-482F-43B7-9F97-F8C3CD12E984} = {2A258019-B49F-4707-9B5B-B09C4C63672B} + {5492ED63-B88D-4A04-BB76-339C094F85CF} = {2E82701B-B905-43F9-98A0-E15C11540B96} + {B8B22A0B-8165-4BD3-9A56-E88353473E21} = {2E82701B-B905-43F9-98A0-E15C11540B96} + {51E5A1BD-75AD-42BC-9220-F0C016A62216} = {47325727-2298-4AB1-BD62-DBC936CF428E} + {F00C1402-7FB5-46D9-98A9-0A846C738130} = {51E5A1BD-75AD-42BC-9220-F0C016A62216} + {999A959B-80CB-427A-BC09-A52E26B5A6DD} = {51E5A1BD-75AD-42BC-9220-F0C016A62216} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {06130F30-21A7-4DB2-AAE3-708A48E91E08} + EndGlobalSection +EndGlobal From d77061e06541379e19b8120b073d2aca13574b9e Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Tue, 1 Aug 2023 23:09:26 +0700 Subject: [PATCH 04/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f924e09b4..07c0dd5e6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,18 +11,17 @@ on: jobs: build: - runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore dependencies run: dotnet restore + working-directory: src - name: Build run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal + working-directory: src From 53b9935f42e645e835892291b08f1af11e6f2618 Mon Sep 17 00:00:00 2001 From: Phat Date: Wed, 2 Aug 2023 00:31:55 +0700 Subject: [PATCH 05/23] Fix cannot build sln by cli --- src/Mixcore.sln | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Mixcore.sln b/src/Mixcore.sln index e357940af..462c99d2e 100644 --- a/src/Mixcore.sln +++ b/src/Mixcore.sln @@ -96,7 +96,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.services.graphql", "ser EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.mixdb.event", "platform\core\mix.mixdb.event\mix.mixdb.event.csproj", "{9508136B-0879-4BF2-B694-3B6242715BE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mixcore.gateway", "applications\mixcore.gateway\mixcore.gateway.csproj", "{B57EEC99-85CF-4C4E-BB10-929CCD1D3723}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mixcore.gateway", "applications\mixcore.gateway\mixcore.gateway.csproj", "{A14F6672-F495-421D-A613-275B70E75DD1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -231,6 +232,10 @@ Global {9508136B-0879-4BF2-B694-3B6242715BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.Build.0 = Release|Any CPU + {A14F6672-F495-421D-A613-275B70E75DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A14F6672-F495-421D-A613-275B70E75DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A14F6672-F495-421D-A613-275B70E75DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A14F6672-F495-421D-A613-275B70E75DD1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -278,6 +283,7 @@ Global {4C1341A9-F5E2-4AB1-A504-5D815CAEEAF3} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} {4C7CFA3D-355B-434F-8442-2B0970BF02C5} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} {9508136B-0879-4BF2-B694-3B6242715BE7} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} + {A14F6672-F495-421D-A613-275B70E75DD1} = {4E880812-C336-4EB2-9FED-2E437957F50A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0143C230-7F40-44B2-8BA3-EF5B92D55848} From 199d0b12938cffb04911531105f1d6f0f5531368 Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Wed, 2 Aug 2023 00:38:58 +0700 Subject: [PATCH 06/23] update submodules github actions --- .github/workflows/dotnet.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 07c0dd5e6..89c974196 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,12 +14,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup .NET + - name: Checkout + uses: actions/checkout@v3 + - name: Pull & update submodules recursively + run: | + git submodule update --init --recursive + git submodule update --recursive --remote + - name: Setup uses: actions/setup-dotnet@v3 with: dotnet-version: 7.0.x - - name: Restore dependencies + - name: Restore run: dotnet restore working-directory: src - name: Build From 15939c1694d5f339b28a724fd86979b5cb92a3ea Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Wed, 2 Aug 2023 13:24:27 +0700 Subject: [PATCH 07/23] check out with submodules --- .github/workflows/dotnet.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 89c974196..6a107c541 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,10 +16,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Pull & update submodules recursively - run: | - git submodule update --init --recursive - git submodule update --recursive --remote + with: + submodules: https://github.com/mixcore/mix.heart.git - name: Setup uses: actions/setup-dotnet@v3 with: From 31a2b72d0f0fe08c9af2d5be5516a70b11edfa86 Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Wed, 2 Aug 2023 13:28:39 +0700 Subject: [PATCH 08/23] Adjust Runner Image on Github Action --- .github/workflows/dotnet.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6a107c541..40ab4c62c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -11,13 +11,14 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v3 with: - submodules: https://github.com/mixcore/mix.heart.git + path: 'develop' + submodules: 'https://github.com/mixcore/mix.heart.git' - name: Setup uses: actions/setup-dotnet@v3 with: From 5d82fb6ef4dfa95f0005e42be5f84c1b08dfd564 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:10:52 +0700 Subject: [PATCH 09/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 40ab4c62c..dd1501c65 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -24,8 +24,8 @@ jobs: with: dotnet-version: 7.0.x - name: Restore - run: dotnet restore + run: dotnet restore src/applications/Mixcore/mixcore.csproj working-directory: src - name: Build - run: dotnet build --no-restore + run: dotnet build src/applications/Mixcore/mixcore.csproj --no-restore working-directory: src From ad00b1df16aa65b81199d8f1a60c2a980d171b2a Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:18:45 +0700 Subject: [PATCH 10/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index dd1501c65..3c7178e22 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,7 +25,5 @@ jobs: dotnet-version: 7.0.x - name: Restore run: dotnet restore src/applications/Mixcore/mixcore.csproj - working-directory: src - name: Build run: dotnet build src/applications/Mixcore/mixcore.csproj --no-restore - working-directory: src From e93b31f47e229151982767da8a7a3f39d02072ca Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:23:06 +0700 Subject: [PATCH 11/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3c7178e22..c8cf4d835 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -24,6 +24,6 @@ jobs: with: dotnet-version: 7.0.x - name: Restore - run: dotnet restore src/applications/Mixcore/mixcore.csproj + run: dotnet restore ${{env.DOTNET_ROOT}}/src/applications/Mixcore/mixcore.csproj - name: Build - run: dotnet build src/applications/Mixcore/mixcore.csproj --no-restore + run: dotnet build ${{env.DOTNET_ROOT}}/src/applications/Mixcore/mixcore.csproj --no-restore From 400e3ac3f4f8ab57144a47b0ebbc4cf847257d6f Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:25:33 +0700 Subject: [PATCH 12/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c8cf4d835..0be983bb6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -24,6 +24,6 @@ jobs: with: dotnet-version: 7.0.x - name: Restore - run: dotnet restore ${{env.DOTNET_ROOT}}/src/applications/Mixcore/mixcore.csproj + run: dotnet restore D:\a\mix.core\mix.core\develop\src\applications\Mixcore\mixcore.csproj - name: Build - run: dotnet build ${{env.DOTNET_ROOT}}/src/applications/Mixcore/mixcore.csproj --no-restore + run: dotnet build D:\a\mix.core\mix.core\develop\src\applications\Mixcore\mixcore.csproj --no-restore From 7a1beb06c5ffc284f7c7ed66ca3b783d81003660 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:35:32 +0700 Subject: [PATCH 13/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0be983bb6..c2af15eac 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,12 +18,13 @@ jobs: uses: actions/checkout@v3 with: path: 'develop' - submodules: 'https://github.com/mixcore/mix.heart.git' + submodules: recursive - name: Setup uses: actions/setup-dotnet@v3 with: dotnet-version: 7.0.x + submodules: recursive - name: Restore - run: dotnet restore D:\a\mix.core\mix.core\develop\src\applications\Mixcore\mixcore.csproj + run: dotnet restore src\Mixcore.sln - name: Build - run: dotnet build D:\a\mix.core\mix.core\develop\src\applications\Mixcore\mixcore.csproj --no-restore + run: dotnet build src\Mixcore.sln --no-restore From cfdef9dbdb97d71500508c3fc96e587496c8c470 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:42:48 +0700 Subject: [PATCH 14/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c2af15eac..a5d87bd93 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore src\Mixcore.sln + run: dotnet restore /src/Mixcore.sln - name: Build - run: dotnet build src\Mixcore.sln --no-restore + run: dotnet build /src/Mixcore.sln --no-restore From 1f994769d47ec772a3455b7b8c14b6ae91a6e3a1 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:44:30 +0700 Subject: [PATCH 15/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a5d87bd93..7e7a1dd58 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore /src/Mixcore.sln + run: dotnet restore /src/applications/Mixcore/mixcore.csproj - name: Build - run: dotnet build /src/Mixcore.sln --no-restore + run: dotnet build /src/applications/Mixcore/mixcore.csproj --no-restore From d5de92d33ec3442467a0af5d0ba0884218e3a5aa Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 3 Aug 2023 09:51:59 +0700 Subject: [PATCH 16/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7e7a1dd58..089de142d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore /src/applications/Mixcore/mixcore.csproj + run: dotnet restore .\src\applications\Mixcore\mixcore.csproj - name: Build - run: dotnet build /src/applications/Mixcore/mixcore.csproj --no-restore + run: dotnet build .\src\applications\Mixcore\mixcore.csproj --no-restore From 4e37ef1c58aa17bab1a88c6e26a60d6804088159 Mon Sep 17 00:00:00 2001 From: Eric Nguyen Date: Thu, 3 Aug 2023 18:30:35 +0700 Subject: [PATCH 17/23] Handle SEO string manually --- .../Mixcore/Controllers/AppController.cs | 5 ++-- .../Mixcore/Controllers/HomeController.cs | 13 ++++++---- .../Mixcore/Controllers/InitController.cs | 5 ++-- .../Mixcore/Controllers/PageController.cs | 12 ++------- .../Mixcore/Controllers/PortalController.cs | 5 ++-- .../Mixcore/Controllers/PostController.cs | 5 ++-- .../Mixcore/Controllers/SecurityController.cs | 5 ++-- .../Mixcore/Domain/Bases/MvcBaseController.cs | 3 ++- src/applications/Mixcore/Startup.cs | 4 +-- .../mix.library/Base/MixControllerBase.cs | 25 ++++++++++++++++--- .../MixContent/Shared/AppConfigs/global.json | 2 +- 11 files changed, 52 insertions(+), 32 deletions(-) diff --git a/src/applications/Mixcore/Controllers/AppController.cs b/src/applications/Mixcore/Controllers/AppController.cs index 18d0b89eb..fb56e554c 100644 --- a/src/applications/Mixcore/Controllers/AppController.cs +++ b/src/applications/Mixcore/Controllers/AppController.cs @@ -20,8 +20,9 @@ public AppController( IMixCmsService mixCmsService, DatabaseService databaseService, MixCmsContext cmsContext, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/HomeController.cs b/src/applications/Mixcore/Controllers/HomeController.cs index 2b83f757f..ff41f424d 100644 --- a/src/applications/Mixcore/Controllers/HomeController.cs +++ b/src/applications/Mixcore/Controllers/HomeController.cs @@ -25,8 +25,9 @@ public HomeController( UnitOfWorkInfo uow, MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, - MixCacheService cacheService) - : base(httpContextAccessor, ipSecurityConfigService, mixCmsService, translator, databaseService, uow, cacheService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, ipSecurityConfigService, mixCmsService, translator, databaseService, uow, cacheService, tenantService) { _repoDbRepository = repoDbRepository; _metadataService = metadataService; @@ -52,10 +53,12 @@ protected override void ValidateRequest() } } - [Route("{seoName?}")] - public async Task Index([FromRoute] string seoName) + [HttpGet("")] + [HttpGet("{seoName}")] + [HttpGet("{culture}/{seoName}")] + public async Task Index() { - + string seoName = Request.RouteValues["seoName"]?.ToString(); if (!IsValid) { return Redirect(RedirectUrl); diff --git a/src/applications/Mixcore/Controllers/InitController.cs b/src/applications/Mixcore/Controllers/InitController.cs index 6c99b4236..5297a9083 100644 --- a/src/applications/Mixcore/Controllers/InitController.cs +++ b/src/applications/Mixcore/Controllers/InitController.cs @@ -11,8 +11,9 @@ public InitController( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, IPSecurityConfigService ipSecurityConfigService, - MixEndpointService mixEndpointService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixEndpointService mixEndpointService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _mixEndpointService = mixEndpointService; } diff --git a/src/applications/Mixcore/Controllers/PageController.cs b/src/applications/Mixcore/Controllers/PageController.cs index 78769ac3f..f879e0716 100644 --- a/src/applications/Mixcore/Controllers/PageController.cs +++ b/src/applications/Mixcore/Controllers/PageController.cs @@ -16,16 +16,8 @@ public class PageController : MixControllerBase private readonly MixRepoDbRepository _repoDbRepository; private readonly IMixMetadataService _metadataService; - public PageController( - IHttpContextAccessor httpContextAccessor, - IPSecurityConfigService ipSecurityConfigService, - IMixCmsService mixCmsService, - DatabaseService databaseService, - MixCmsContext cmsContext, - MixRepoDbRepository repoDbRepository, - IMixMetadataService metadataService, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + public PageController(IHttpContextAccessor httpContextAccessor, IPSecurityConfigService ipSecurityConfigService, IMixCmsService mixCmsService, DatabaseService databaseService, MixCmsContext cmsContext, MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, MixCacheService cacheService, IMixTenantService tenantService) : + base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/PortalController.cs b/src/applications/Mixcore/Controllers/PortalController.cs index e6863afa1..63cb0ddd2 100644 --- a/src/applications/Mixcore/Controllers/PortalController.cs +++ b/src/applications/Mixcore/Controllers/PortalController.cs @@ -11,8 +11,9 @@ public class PortalController : MixControllerBase public PortalController( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, - DatabaseService databaseService, IPSecurityConfigService ipSecurityConfigService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + DatabaseService databaseService, IPSecurityConfigService ipSecurityConfigService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _databaseService = databaseService; } diff --git a/src/applications/Mixcore/Controllers/PostController.cs b/src/applications/Mixcore/Controllers/PostController.cs index d084ba3fa..7555afed1 100644 --- a/src/applications/Mixcore/Controllers/PostController.cs +++ b/src/applications/Mixcore/Controllers/PostController.cs @@ -27,8 +27,9 @@ public PostController( MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, UnitOfWorkInfo dbUow, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/SecurityController.cs b/src/applications/Mixcore/Controllers/SecurityController.cs index 8f4a661a1..9429a44b8 100644 --- a/src/applications/Mixcore/Controllers/SecurityController.cs +++ b/src/applications/Mixcore/Controllers/SecurityController.cs @@ -26,8 +26,9 @@ public SecurityController( ILogger logger, MixIdentityService idService, TenantUserManager userManager, - MixEndpointService mixEndpointService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixEndpointService mixEndpointService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _signInManager = signInManager; _logger = logger; diff --git a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs index b06e15289..c1227d659 100644 --- a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs +++ b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs @@ -19,7 +19,8 @@ public MvcBaseController( TranslatorService translator, DatabaseService databaseService, UnitOfWorkInfo uow, - MixCacheService cacheService) : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { Translator = translator; DatabaseService = databaseService; diff --git a/src/applications/Mixcore/Startup.cs b/src/applications/Mixcore/Startup.cs index 51b794abf..0a63d9642 100644 --- a/src/applications/Mixcore/Startup.cs +++ b/src/applications/Mixcore/Startup.cs @@ -53,7 +53,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseMixTenant(); app.UseMiddleware(); - + app.UseMixRoutes(); app.UseMixApps(Assembly.GetExecutingAssembly(), Configuration, env.ContentRootPath, env.IsDevelopment()); app.UseResponseCompression(); @@ -75,7 +75,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseHttpsRedirection(); } - app.UseMixRoutes(); + } } } diff --git a/src/platform/mix.library/Base/MixControllerBase.cs b/src/platform/mix.library/Base/MixControllerBase.cs index 2fdcdbfa5..dd224e523 100644 --- a/src/platform/mix.library/Base/MixControllerBase.cs +++ b/src/platform/mix.library/Base/MixControllerBase.cs @@ -18,6 +18,7 @@ public abstract class MixControllerBase : Controller protected string RedirectUrl; protected readonly IPSecurityConfigService IpSecurityConfigService; protected readonly IMixCmsService MixCmsService; + protected IMixTenantService TenantService; protected MixTenantSystemModel CurrentTenant => Session.Get(MixRequestQueryKeywords.Tenant); protected bool ForbiddenPortal { @@ -38,12 +39,14 @@ protected bool ForbiddenPortal protected MixControllerBase( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, - IPSecurityConfigService ipSecurityConfigService) + IPSecurityConfigService ipSecurityConfigService, + IMixTenantService tenantService) { Session = httpContextAccessor.HttpContext?.Session; IpSecurityConfigService = ipSecurityConfigService; ViewData[MixRequestQueryKeywords.Tenant] = CurrentTenant; MixCmsService = mixCmsService; + TenantService = tenantService; } private void LoadCulture() @@ -52,6 +55,17 @@ private void LoadCulture() { Culture = RouteData.Values["culture"]?.ToString()?.ToLower(); } + if (RouteData.Values["seoName"] is not null) + { + string seoName = RouteData.Values["seoName"]?.ToString()?.ToLower(); + string culture = seoName.Split('/')[0]; + if (TenantService.AllCultures.Any(m => m.Specificulture == culture)) + { + RouteData.Values["culture"] = culture; + RouteData.Values["seoName"] = seoName.Replace(culture, string.Empty); + Culture = culture; + } + } //if (!_globalConfigService.Instance.CheckValidCulture(Culture)) //{ // Culture = GlobalConfigService.Instance.AppSettings.DefaultCulture; @@ -74,13 +88,18 @@ private void LoadCulture() public string Culture { get; set; } - public override void OnActionExecuting(ActionExecutingContext context) + public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { - ValidateRequest(); if (!GlobalConfigService.Instance.AppSettings.IsInit) { LoadCulture(); } + return base.OnActionExecutionAsync(context, next); + } + public override void OnActionExecuting(ActionExecutingContext context) + { + ValidateRequest(); + if (!string.IsNullOrEmpty(Culture)) { ViewData["Culture"] = Culture; diff --git a/src/shared/MixContent/Shared/AppConfigs/global.json b/src/shared/MixContent/Shared/AppConfigs/global.json index 4fc2e5fdd..d10ed6a89 100644 --- a/src/shared/MixContent/Shared/AppConfigs/global.json +++ b/src/shared/MixContent/Shared/AppConfigs/global.json @@ -2,7 +2,7 @@ "IsInit": true, "IsLogStream": false, "IsEncryptApi": false, - "EnableOcelot": true, + "EnableOcelot": false, "PortalThemeSettings": null, "IsMaintenance": false, "IsHttps": false, From 4aad794fe63b1944731590789cb5b0e75d1e6346 Mon Sep 17 00:00:00 2001 From: Eric Nguyen Date: Thu, 3 Aug 2023 18:34:12 +0700 Subject: [PATCH 18/23] Handle SEO manually --- .../Mixcore/Controllers/AppController.cs | 5 ++-- .../Mixcore/Controllers/HomeController.cs | 13 ++++---- .../Mixcore/Controllers/InitController.cs | 5 ++-- .../Mixcore/Controllers/PageController.cs | 12 ++------ .../Mixcore/Controllers/PortalController.cs | 5 ++-- .../Mixcore/Controllers/PostController.cs | 5 ++-- .../Mixcore/Controllers/SecurityController.cs | 5 ++-- .../Mixcore/Domain/Bases/MvcBaseController.cs | 3 +- .../Domain/Extensions/ServiceExtension.cs | 30 +++++++++---------- src/applications/Mixcore/Startup.cs | 4 +-- .../mix.library/Base/MixControllerBase.cs | 25 ++++++++++++++-- .../MixContent/Shared/AppConfigs/global.json | 2 +- 12 files changed, 67 insertions(+), 47 deletions(-) diff --git a/src/applications/Mixcore/Controllers/AppController.cs b/src/applications/Mixcore/Controllers/AppController.cs index 18d0b89eb..fb56e554c 100644 --- a/src/applications/Mixcore/Controllers/AppController.cs +++ b/src/applications/Mixcore/Controllers/AppController.cs @@ -20,8 +20,9 @@ public AppController( IMixCmsService mixCmsService, DatabaseService databaseService, MixCmsContext cmsContext, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/HomeController.cs b/src/applications/Mixcore/Controllers/HomeController.cs index 2b83f757f..ff41f424d 100644 --- a/src/applications/Mixcore/Controllers/HomeController.cs +++ b/src/applications/Mixcore/Controllers/HomeController.cs @@ -25,8 +25,9 @@ public HomeController( UnitOfWorkInfo uow, MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, - MixCacheService cacheService) - : base(httpContextAccessor, ipSecurityConfigService, mixCmsService, translator, databaseService, uow, cacheService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, ipSecurityConfigService, mixCmsService, translator, databaseService, uow, cacheService, tenantService) { _repoDbRepository = repoDbRepository; _metadataService = metadataService; @@ -52,10 +53,12 @@ protected override void ValidateRequest() } } - [Route("{seoName?}")] - public async Task Index([FromRoute] string seoName) + [HttpGet("")] + [HttpGet("{seoName}")] + [HttpGet("{culture}/{seoName}")] + public async Task Index() { - + string seoName = Request.RouteValues["seoName"]?.ToString(); if (!IsValid) { return Redirect(RedirectUrl); diff --git a/src/applications/Mixcore/Controllers/InitController.cs b/src/applications/Mixcore/Controllers/InitController.cs index 6c99b4236..5297a9083 100644 --- a/src/applications/Mixcore/Controllers/InitController.cs +++ b/src/applications/Mixcore/Controllers/InitController.cs @@ -11,8 +11,9 @@ public InitController( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, IPSecurityConfigService ipSecurityConfigService, - MixEndpointService mixEndpointService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixEndpointService mixEndpointService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _mixEndpointService = mixEndpointService; } diff --git a/src/applications/Mixcore/Controllers/PageController.cs b/src/applications/Mixcore/Controllers/PageController.cs index 78769ac3f..f879e0716 100644 --- a/src/applications/Mixcore/Controllers/PageController.cs +++ b/src/applications/Mixcore/Controllers/PageController.cs @@ -16,16 +16,8 @@ public class PageController : MixControllerBase private readonly MixRepoDbRepository _repoDbRepository; private readonly IMixMetadataService _metadataService; - public PageController( - IHttpContextAccessor httpContextAccessor, - IPSecurityConfigService ipSecurityConfigService, - IMixCmsService mixCmsService, - DatabaseService databaseService, - MixCmsContext cmsContext, - MixRepoDbRepository repoDbRepository, - IMixMetadataService metadataService, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + public PageController(IHttpContextAccessor httpContextAccessor, IPSecurityConfigService ipSecurityConfigService, IMixCmsService mixCmsService, DatabaseService databaseService, MixCmsContext cmsContext, MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, MixCacheService cacheService, IMixTenantService tenantService) : + base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/PortalController.cs b/src/applications/Mixcore/Controllers/PortalController.cs index e6863afa1..63cb0ddd2 100644 --- a/src/applications/Mixcore/Controllers/PortalController.cs +++ b/src/applications/Mixcore/Controllers/PortalController.cs @@ -11,8 +11,9 @@ public class PortalController : MixControllerBase public PortalController( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, - DatabaseService databaseService, IPSecurityConfigService ipSecurityConfigService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + DatabaseService databaseService, IPSecurityConfigService ipSecurityConfigService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _databaseService = databaseService; } diff --git a/src/applications/Mixcore/Controllers/PostController.cs b/src/applications/Mixcore/Controllers/PostController.cs index d084ba3fa..7555afed1 100644 --- a/src/applications/Mixcore/Controllers/PostController.cs +++ b/src/applications/Mixcore/Controllers/PostController.cs @@ -27,8 +27,9 @@ public PostController( MixRepoDbRepository repoDbRepository, IMixMetadataService metadataService, UnitOfWorkInfo dbUow, - MixCacheService cacheService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { CmsContext = cmsContext; Uow = new(CmsContext); diff --git a/src/applications/Mixcore/Controllers/SecurityController.cs b/src/applications/Mixcore/Controllers/SecurityController.cs index 8f4a661a1..9429a44b8 100644 --- a/src/applications/Mixcore/Controllers/SecurityController.cs +++ b/src/applications/Mixcore/Controllers/SecurityController.cs @@ -26,8 +26,9 @@ public SecurityController( ILogger logger, MixIdentityService idService, TenantUserManager userManager, - MixEndpointService mixEndpointService) - : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixEndpointService mixEndpointService, + IMixTenantService tenantService) + : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { _signInManager = signInManager; _logger = logger; diff --git a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs index b06e15289..c1227d659 100644 --- a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs +++ b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs @@ -19,7 +19,8 @@ public MvcBaseController( TranslatorService translator, DatabaseService databaseService, UnitOfWorkInfo uow, - MixCacheService cacheService) : base(httpContextAccessor, mixCmsService, ipSecurityConfigService) + MixCacheService cacheService, + IMixTenantService tenantService) : base(httpContextAccessor, mixCmsService, ipSecurityConfigService, tenantService) { Translator = translator; DatabaseService = databaseService; diff --git a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs index 7535288a7..4707b6ad9 100644 --- a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs +++ b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs @@ -44,21 +44,21 @@ public static IApplicationBuilder UseMixRoutes(this IApplicationBuilder app) //string notStartWithPattern = "regex(^(?!(graph|app|init|page|post|security|portal|api|vue|error|swagger|graphql|ReDoc|OpenAPI|.+Hub))(.+)$)"; //string urlPathPattern = @"regex((([A-z0-9\-\%]+\/)*[A-z0-9\-\%]+$)?)"; app.UseRouting(); - //app.UseEndpoints(routes => - //{ - // //routes.MapDefaultControllerRoute(); - // routes.MapDynamicControllerRoute( - // pattern: "{seoName:" + notStartWithPattern + "}"); - // routes.MapDynamicControllerRoute( - // pattern: "{culture:" + notStartWithPattern + "}/{seoName}"); - // routes.MapDynamicControllerRoute( - // pattern: "{controller:" + notStartWithPattern + "}/{id}/{seoName}"); - // routes.MapDynamicControllerRoute( - // pattern: "{culture:" + notStartWithPattern + "}/{controller}/{id}/{seoName}"); - // //routes.MapDynamicControllerRoute( - // // pattern: "portal-apps/{appFolder:" + urlPathPattern + "}/{param1?}/{param2?}/{param3?}/{param4?}"); - // routes.MapFallbackToFile("/index.html"); - //}); + app.UseEndpoints(routes => + { + routes.MapDefaultControllerRoute(); + //routes.MapDynamicControllerRoute( + // pattern: "{seoName:" + notStartWithPattern + "}"); + //routes.MapDynamicControllerRoute( + // pattern: "{culture:" + notStartWithPattern + "}/{seoName}"); + //routes.MapDynamicControllerRoute( + // pattern: "{controller:" + notStartWithPattern + "}/{id}/{seoName}"); + //routes.MapDynamicControllerRoute( + // pattern: "{culture:" + notStartWithPattern + "}/{controller}/{id}/{seoName}"); + ////routes.MapDynamicControllerRoute( + //// pattern: "portal-apps/{appFolder:" + urlPathPattern + "}/{param1?}/{param2?}/{param3?}/{param4?}"); + routes.MapFallbackToFile("/index.html"); + }); return app; } diff --git a/src/applications/Mixcore/Startup.cs b/src/applications/Mixcore/Startup.cs index 51b794abf..0a63d9642 100644 --- a/src/applications/Mixcore/Startup.cs +++ b/src/applications/Mixcore/Startup.cs @@ -53,7 +53,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseMixTenant(); app.UseMiddleware(); - + app.UseMixRoutes(); app.UseMixApps(Assembly.GetExecutingAssembly(), Configuration, env.ContentRootPath, env.IsDevelopment()); app.UseResponseCompression(); @@ -75,7 +75,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseHttpsRedirection(); } - app.UseMixRoutes(); + } } } diff --git a/src/platform/mix.library/Base/MixControllerBase.cs b/src/platform/mix.library/Base/MixControllerBase.cs index 2fdcdbfa5..dd224e523 100644 --- a/src/platform/mix.library/Base/MixControllerBase.cs +++ b/src/platform/mix.library/Base/MixControllerBase.cs @@ -18,6 +18,7 @@ public abstract class MixControllerBase : Controller protected string RedirectUrl; protected readonly IPSecurityConfigService IpSecurityConfigService; protected readonly IMixCmsService MixCmsService; + protected IMixTenantService TenantService; protected MixTenantSystemModel CurrentTenant => Session.Get(MixRequestQueryKeywords.Tenant); protected bool ForbiddenPortal { @@ -38,12 +39,14 @@ protected bool ForbiddenPortal protected MixControllerBase( IHttpContextAccessor httpContextAccessor, IMixCmsService mixCmsService, - IPSecurityConfigService ipSecurityConfigService) + IPSecurityConfigService ipSecurityConfigService, + IMixTenantService tenantService) { Session = httpContextAccessor.HttpContext?.Session; IpSecurityConfigService = ipSecurityConfigService; ViewData[MixRequestQueryKeywords.Tenant] = CurrentTenant; MixCmsService = mixCmsService; + TenantService = tenantService; } private void LoadCulture() @@ -52,6 +55,17 @@ private void LoadCulture() { Culture = RouteData.Values["culture"]?.ToString()?.ToLower(); } + if (RouteData.Values["seoName"] is not null) + { + string seoName = RouteData.Values["seoName"]?.ToString()?.ToLower(); + string culture = seoName.Split('/')[0]; + if (TenantService.AllCultures.Any(m => m.Specificulture == culture)) + { + RouteData.Values["culture"] = culture; + RouteData.Values["seoName"] = seoName.Replace(culture, string.Empty); + Culture = culture; + } + } //if (!_globalConfigService.Instance.CheckValidCulture(Culture)) //{ // Culture = GlobalConfigService.Instance.AppSettings.DefaultCulture; @@ -74,13 +88,18 @@ private void LoadCulture() public string Culture { get; set; } - public override void OnActionExecuting(ActionExecutingContext context) + public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { - ValidateRequest(); if (!GlobalConfigService.Instance.AppSettings.IsInit) { LoadCulture(); } + return base.OnActionExecutionAsync(context, next); + } + public override void OnActionExecuting(ActionExecutingContext context) + { + ValidateRequest(); + if (!string.IsNullOrEmpty(Culture)) { ViewData["Culture"] = Culture; diff --git a/src/shared/MixContent/Shared/AppConfigs/global.json b/src/shared/MixContent/Shared/AppConfigs/global.json index 4fc2e5fdd..d10ed6a89 100644 --- a/src/shared/MixContent/Shared/AppConfigs/global.json +++ b/src/shared/MixContent/Shared/AppConfigs/global.json @@ -2,7 +2,7 @@ "IsInit": true, "IsLogStream": false, "IsEncryptApi": false, - "EnableOcelot": true, + "EnableOcelot": false, "PortalThemeSettings": null, "IsMaintenance": false, "IsHttps": false, From 5055817a1a4205229499b40a0b69e720a793d9c3 Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Fri, 4 Aug 2023 20:45:31 +0700 Subject: [PATCH 19/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 089de142d..f9bfdad9a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,9 +5,9 @@ name: .NET on: push: - branches: [ "develop" ] + branches: [ "feature/refactor" ] pull_request: - branches: [ "develop" ] + branches: [ "feature/refactor" ] jobs: build: @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore .\src\applications\Mixcore\mixcore.csproj + run: dotnet restore - name: Build - run: dotnet build .\src\applications\Mixcore\mixcore.csproj --no-restore + run: dotnet build From fd1d99c7a27554f47da7524170e7aeec0f24c2db Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Fri, 4 Aug 2023 20:48:17 +0700 Subject: [PATCH 20/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f9bfdad9a..c2beff1b7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore + run: dotnet restore Mixcore.sln - name: Build - run: dotnet build + run: dotnet build Mixcore.sln --no-restore From f8fe73811edc66d90f1916b19a2aa0612ead9c3c Mon Sep 17 00:00:00 2001 From: Phat Truong Date: Fri, 4 Aug 2023 20:53:01 +0700 Subject: [PATCH 21/23] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c2beff1b7..1e778274a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,6 @@ jobs: dotnet-version: 7.0.x submodules: recursive - name: Restore - run: dotnet restore Mixcore.sln + run: dotnet restore develop/Mixcore.sln - name: Build - run: dotnet build Mixcore.sln --no-restore + run: dotnet build develop/Mixcore.sln --no-restore From dd43d3b0b2db7a90a7ec793e1731baeccc3e220c Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Nhat Date: Tue, 8 Aug 2023 13:54:33 +0700 Subject: [PATCH 22/23] fix un authorized request --- .../Mixcore/Domain/Extensions/ServiceExtension.cs | 2 +- src/applications/Mixcore/Startup.cs | 9 ++++++++- .../mix.library/Startup/_ServiceCollectionExtensions.cs | 3 --- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs index 4707b6ad9..190953c67 100644 --- a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs +++ b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs @@ -43,7 +43,7 @@ public static IApplicationBuilder UseMixRoutes(this IApplicationBuilder app) { //string notStartWithPattern = "regex(^(?!(graph|app|init|page|post|security|portal|api|vue|error|swagger|graphql|ReDoc|OpenAPI|.+Hub))(.+)$)"; //string urlPathPattern = @"regex((([A-z0-9\-\%]+\/)*[A-z0-9\-\%]+$)?)"; - app.UseRouting(); + app.UseEndpoints(routes => { routes.MapDefaultControllerRoute(); diff --git a/src/applications/Mixcore/Startup.cs b/src/applications/Mixcore/Startup.cs index 9ccc954ea..19e0c3c3b 100644 --- a/src/applications/Mixcore/Startup.cs +++ b/src/applications/Mixcore/Startup.cs @@ -50,8 +50,15 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseMixTenant(); app.UseMiddleware(); - app.UseMixRoutes(); + + app.UseRouting(); + + // If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them. + app.UseAuthentication(); + app.UseAuthorization(); + app.UseMixApps(Assembly.GetExecutingAssembly(), Configuration, env.ContentRootPath, env.IsDevelopment()); + app.UseMixRoutes(); app.UseResponseCompression(); app.UseMixResponseCaching(); diff --git a/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs b/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs index 714992fdf..76646bc72 100644 --- a/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs +++ b/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs @@ -132,9 +132,6 @@ public static IApplicationBuilder UseMixApps( bool isDevelop) { app.UseHttpLogging(); - - app.UseAuthentication(); - app.UseAuthorization(); app.UseUoWs(); app.UseMixModuleApps(configuration, isDevelop); app.UseMixSwaggerApps(isDevelop, executingAssembly); From c815ec84a1ae8f6de7fe98bb4b3a1630c3482327 Mon Sep 17 00:00:00 2001 From: Eric Nguyen Date: Thu, 10 Aug 2023 18:20:59 +0700 Subject: [PATCH 23/23] restructure solution folders --- src/Mixcore.sln | 103 ++++++++++-------- .../Domain/Extensions/ServiceExtension.cs | 2 +- src/applications/Mixcore/Startup.cs | 7 +- src/applications/mixcore.gateway/Startup.cs | 2 +- .../AuthServiceCollectionExtensions.cs | 5 +- 5 files changed, 64 insertions(+), 55 deletions(-) diff --git a/src/Mixcore.sln b/src/Mixcore.sln index d75b378f3..32389c7a4 100644 --- a/src/Mixcore.sln +++ b/src/Mixcore.sln @@ -8,9 +8,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{5B29B975-B0AC-46B3-8398-4C8A22EAE355}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{38F30F45-7DB6-4097-BA85-788ACCCBC5F2}" - ProjectSection(SolutionItems) = preProject - CodeMap.dgml = CodeMap.dgml - EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "applications", "applications", "{4E880812-C336-4EB2-9FED-2E437957F50A}" EndProject @@ -64,13 +61,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.repodb", "platform\mix. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.service", "platform\mix.service\mix.service.csproj", "{728EBD5B-266E-4476-9BDC-37D12194AFE2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{2D4838F0-251E-4383-9DAD-7FF91B0E0606}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "codemaps", "codemaps", "{7CEDC89A-61AF-48D8-91EF-EBE2689901CC}" - ProjectSection(SolutionItems) = preProject - CodeMap.dgml = CodeMap.dgml - codemaps\CodeMap_Platform.dgml = codemaps\CodeMap_Platform.dgml - EndProjectSection +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_6", "level_6", "{2D4838F0-251E-4383-9DAD-7FF91B0E0606}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "services", "services", "{C0A05428-767E-46C5-A31F-0D220E41F7C5}" EndProject @@ -98,11 +89,25 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mix.mixdb.event", "platform EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mixcore.gateway", "applications\mixcore.gateway\mixcore.gateway.csproj", "{B57EEC99-85CF-4C4E-BB10-929CCD1D3723}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl0", "lvl0", "{147A1144-45E8-448A-9FD7-511C999E5727}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_0", "level_0", "{147A1144-45E8-448A-9FD7-511C999E5727}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_1", "level_1", "{0027B7D2-664D-4872-AE99-BA2A2BCA6B2E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_2", "level_2", "{92F3CAD3-DBF4-4587-A14D-8DECE4077D0C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_3", "level_3", "{69169108-92D3-411D-87EB-DF2DD026FE64}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_4", "level_4", "{175276C1-45BB-4C30-BB93-4CB2C2D4A60C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_5", "level_5", "{84C68A6F-ECE0-467E-91C0-AE63AC4FC4C7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_7", "level_7", "{98FE9DF6-4B31-4A0D-A4F9-74196114CD9D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_0", "level_0", "{7C9FFA1B-D992-4E3F-B2B1-74D86E81512D}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lvl1", "lvl1", "{0027B7D2-664D-4872-AE99-BA2A2BCA6B2E}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_0", "level_0", "{6F925183-31E6-4DEB-BAB1-80F330B9E199}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lv2", "lv2", "{92F3CAD3-DBF4-4587-A14D-8DECE4077D0C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "level_1", "level_1", "{B4C40E02-E06A-4359-BDC5-349E103366AD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -238,10 +243,6 @@ Global {9508136B-0879-4BF2-B694-3B6242715BE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {9508136B-0879-4BF2-B694-3B6242715BE7}.Release|Any CPU.Build.0 = Release|Any CPU - {A14F6672-F495-421D-A613-275B70E75DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A14F6672-F495-421D-A613-275B70E75DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A14F6672-F495-421D-A613-275B70E75DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A14F6672-F495-421D-A613-275B70E75DD1}.Release|Any CPU.Build.0 = Release|Any CPU {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Debug|Any CPU.Build.0 = Debug|Any CPU {B57EEC99-85CF-4C4E-BB10-929CCD1D3723}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -254,49 +255,55 @@ Global {45077DFB-D35A-4491-993C-2AC4C8AC838E} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} {5B29B975-B0AC-46B3-8398-4C8A22EAE355} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} {4E880812-C336-4EB2-9FED-2E437957F50A} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} - {5CC5900C-50FE-4D78-9E4F-7CE267355622} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {5CC5900C-50FE-4D78-9E4F-7CE267355622} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} {928B382F-48A0-4639-9EC0-0C9BE980C5C6} = {4E880812-C336-4EB2-9FED-2E437957F50A} - {E6801B38-0264-456C-B8E6-A73262B6CBA7} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {3716FB3C-CDC3-45E7-9809-CF7F2DD30388} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {4B1A6E00-C5E7-4DA7-B234-36EA35CC9B44} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {19560515-92A4-4955-BDD9-E1CDA7E8A3BC} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {C56B8C71-AEFB-4B4C-9545-03F6A646A998} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {8401BAD4-7658-4357-859C-19F40E731848} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {681C6E43-9F8E-4A9B-AD03-12702CF47720} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {A92D009D-2C5B-46BC-893A-7AE995EE8814} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {C7AF2FD1-8490-4238-B40D-7245872FCFEC} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {F8E82C2E-0F24-4CD1-981D-436D08F73587} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} + {E6801B38-0264-456C-B8E6-A73262B6CBA7} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {3716FB3C-CDC3-45E7-9809-CF7F2DD30388} = {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} + {4B1A6E00-C5E7-4DA7-B234-36EA35CC9B44} = {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} + {19560515-92A4-4955-BDD9-E1CDA7E8A3BC} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {C56B8C71-AEFB-4B4C-9545-03F6A646A998} = {B4C40E02-E06A-4359-BDC5-349E103366AD} + {8401BAD4-7658-4357-859C-19F40E731848} = {92F3CAD3-DBF4-4587-A14D-8DECE4077D0C} + {681C6E43-9F8E-4A9B-AD03-12702CF47720} = {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} + {A92D009D-2C5B-46BC-893A-7AE995EE8814} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {C7AF2FD1-8490-4238-B40D-7245872FCFEC} = {69169108-92D3-411D-87EB-DF2DD026FE64} + {F8E82C2E-0F24-4CD1-981D-436D08F73587} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} {8D3FF4E3-4C56-4FA6-81CC-686DE037FF59} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} {CD0F866F-FF61-456B-AAEA-9960B17107E3} = {8D3FF4E3-4C56-4FA6-81CC-686DE037FF59} - {80A478DE-09AD-4C60-B446-73946D8B0E51} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {2E843175-B948-4D90-A11B-415EE67D9E1A} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} + {80A478DE-09AD-4C60-B446-73946D8B0E51} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {2E843175-B948-4D90-A11B-415EE67D9E1A} = {92F3CAD3-DBF4-4587-A14D-8DECE4077D0C} {D4938E22-22C3-4364-A710-557B63954B5E} = {147A1144-45E8-448A-9FD7-511C999E5727} - {2D254550-CE54-43A2-8AE9-FAA72F2C0FD6} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {94790DB1-AC71-48BF-8665-D04C86064231} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} - {34A92D4D-B94A-4674-BBA4-8D2F80BECCB6} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {081A8E1E-B431-4044-B4B7-203BD1E00589} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {E974EBC1-B6C9-4BC0-AFA5-33EB182CB6A6} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} - {5486F6D4-6144-470A-BEB5-270C4D02486B} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} - {C6B46863-6A6E-4BC0-84F6-EF9DCBCA77D1} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} - {728EBD5B-266E-4476-9BDC-37D12194AFE2} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {2D254550-CE54-43A2-8AE9-FAA72F2C0FD6} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {94790DB1-AC71-48BF-8665-D04C86064231} = {175276C1-45BB-4C30-BB93-4CB2C2D4A60C} + {34A92D4D-B94A-4674-BBA4-8D2F80BECCB6} = {147A1144-45E8-448A-9FD7-511C999E5727} + {081A8E1E-B431-4044-B4B7-203BD1E00589} = {84C68A6F-ECE0-467E-91C0-AE63AC4FC4C7} + {E974EBC1-B6C9-4BC0-AFA5-33EB182CB6A6} = {6F925183-31E6-4DEB-BAB1-80F330B9E199} + {5486F6D4-6144-470A-BEB5-270C4D02486B} = {98FE9DF6-4B31-4A0D-A4F9-74196114CD9D} + {C6B46863-6A6E-4BC0-84F6-EF9DCBCA77D1} = {69169108-92D3-411D-87EB-DF2DD026FE64} + {728EBD5B-266E-4476-9BDC-37D12194AFE2} = {175276C1-45BB-4C30-BB93-4CB2C2D4A60C} {2D4838F0-251E-4383-9DAD-7FF91B0E0606} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} - {7CEDC89A-61AF-48D8-91EF-EBE2689901CC} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} {C0A05428-767E-46C5-A31F-0D220E41F7C5} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} - {362A9E6F-A253-4D17-B164-C037609DD67B} = {C0A05428-767E-46C5-A31F-0D220E41F7C5} + {362A9E6F-A253-4D17-B164-C037609DD67B} = {7C9FFA1B-D992-4E3F-B2B1-74D86E81512D} {9ADA8E1F-F444-472C-914C-9AF2386B2D0D} = {362A9E6F-A253-4D17-B164-C037609DD67B} - {9052327F-0A55-43C2-808A-B315D12A1EB1} = {C0A05428-767E-46C5-A31F-0D220E41F7C5} + {9052327F-0A55-43C2-808A-B315D12A1EB1} = {7C9FFA1B-D992-4E3F-B2B1-74D86E81512D} {973AC418-7E56-44F0-83B8-C316565BB0E5} = {9052327F-0A55-43C2-808A-B315D12A1EB1} {309813E4-D6E9-4B25-949F-49B808F4DFF7} = {362A9E6F-A253-4D17-B164-C037609DD67B} {53FDEAC2-ADEB-4E02-AF44-DC986672A02E} = {9052327F-0A55-43C2-808A-B315D12A1EB1} - {356FB416-1C32-4B59-91B4-62F62CBE394E} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} - {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} = {C0A05428-767E-46C5-A31F-0D220E41F7C5} + {356FB416-1C32-4B59-91B4-62F62CBE394E} = {84C68A6F-ECE0-467E-91C0-AE63AC4FC4C7} + {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} = {7C9FFA1B-D992-4E3F-B2B1-74D86E81512D} {4C1341A9-F5E2-4AB1-A504-5D815CAEEAF3} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} {4C7CFA3D-355B-434F-8442-2B0970BF02C5} = {7212EE31-82F0-4741-B55F-7BCE0A3DFC5A} - {9508136B-0879-4BF2-B694-3B6242715BE7} = {2D4838F0-251E-4383-9DAD-7FF91B0E0606} - {A14F6672-F495-421D-A613-275B70E75DD1} = {4E880812-C336-4EB2-9FED-2E437957F50A} - {147A1144-45E8-448A-9FD7-511C999E5727} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} - {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} - {92F3CAD3-DBF4-4587-A14D-8DECE4077D0C} = {38F30F45-7DB6-4097-BA85-788ACCCBC5F2} + {9508136B-0879-4BF2-B694-3B6242715BE7} = {175276C1-45BB-4C30-BB93-4CB2C2D4A60C} + {B57EEC99-85CF-4C4E-BB10-929CCD1D3723} = {4E880812-C336-4EB2-9FED-2E437957F50A} + {147A1144-45E8-448A-9FD7-511C999E5727} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {0027B7D2-664D-4872-AE99-BA2A2BCA6B2E} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {92F3CAD3-DBF4-4587-A14D-8DECE4077D0C} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {69169108-92D3-411D-87EB-DF2DD026FE64} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {175276C1-45BB-4C30-BB93-4CB2C2D4A60C} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {84C68A6F-ECE0-467E-91C0-AE63AC4FC4C7} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {98FE9DF6-4B31-4A0D-A4F9-74196114CD9D} = {45077DFB-D35A-4491-993C-2AC4C8AC838E} + {7C9FFA1B-D992-4E3F-B2B1-74D86E81512D} = {C0A05428-767E-46C5-A31F-0D220E41F7C5} + {6F925183-31E6-4DEB-BAB1-80F330B9E199} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} + {B4C40E02-E06A-4359-BDC5-349E103366AD} = {5B29B975-B0AC-46B3-8398-4C8A22EAE355} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0143C230-7F40-44B2-8BA3-EF5B92D55848} diff --git a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs index 190953c67..bc22f1134 100644 --- a/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs +++ b/src/applications/Mixcore/Domain/Extensions/ServiceExtension.cs @@ -39,7 +39,7 @@ public static void AddMixRoutes(this IServiceCollection services) //services.AddSingleton(); } - public static IApplicationBuilder UseMixRoutes(this IApplicationBuilder app) + public static IApplicationBuilder UseMixEndpoints(this IApplicationBuilder app) { //string notStartWithPattern = "regex(^(?!(graph|app|init|page|post|security|portal|api|vue|error|swagger|graphql|ReDoc|OpenAPI|.+Hub))(.+)$)"; //string urlPathPattern = @"regex((([A-z0-9\-\%]+\/)*[A-z0-9\-\%]+$)?)"; diff --git a/src/applications/Mixcore/Startup.cs b/src/applications/Mixcore/Startup.cs index 19e0c3c3b..4741c79a0 100644 --- a/src/applications/Mixcore/Startup.cs +++ b/src/applications/Mixcore/Startup.cs @@ -53,12 +53,11 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseRouting(); - // If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them. - app.UseAuthentication(); - app.UseAuthorization(); + // must go between app.UseRouting() and app.UseEndpoints. + app.UseMixAuth(); app.UseMixApps(Assembly.GetExecutingAssembly(), Configuration, env.ContentRootPath, env.IsDevelopment()); - app.UseMixRoutes(); + app.UseMixEndpoints(); app.UseResponseCompression(); app.UseMixResponseCaching(); diff --git a/src/applications/mixcore.gateway/Startup.cs b/src/applications/mixcore.gateway/Startup.cs index a35cfcfea..d5443d96a 100644 --- a/src/applications/mixcore.gateway/Startup.cs +++ b/src/applications/mixcore.gateway/Startup.cs @@ -44,7 +44,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) } //app.UseResponseCompression(); app.UseRouting(); - app.UseMixAuthorize(); + app.UseMixAuth(); app.UseMixSwaggerApps(env.IsDevelopment(), Assembly.GetExecutingAssembly()); app.UseOcelot().Wait(); } diff --git a/src/platform/mix.library/Startup/AuthServiceCollectionExtensions.cs b/src/platform/mix.library/Startup/AuthServiceCollectionExtensions.cs index 81dd7d475..c3aa47749 100644 --- a/src/platform/mix.library/Startup/AuthServiceCollectionExtensions.cs +++ b/src/platform/mix.library/Startup/AuthServiceCollectionExtensions.cs @@ -122,8 +122,11 @@ public static IServiceCollection AddMixAuthorize(this IServiceCollec return services; } - public static IApplicationBuilder UseMixAuthorize(this IApplicationBuilder app) + public static IApplicationBuilder UseMixAuth(this IApplicationBuilder app) { + // If there are calls to app.UseRouting() and app.UseEndpoints(...), the call to app.UseAuthorization() must go between them. + app.UseAuthentication(); + app.UseAuthorization(); return app; }