Browse Source

Separate project for web dependencies to give them access in the plugin.

pull/349/head
Sebastian Stehle 7 years ago
parent
commit
efef6b63cb
  1. 46
      Squidex.sln
  2. 60
      src/Squidex.Web/ApiController.cs
  3. 3
      src/Squidex.Web/ApiCostsAttribute.cs
  4. 2
      src/Squidex.Web/ApiExceptionFilterAttribute.cs
  5. 2
      src/Squidex.Web/ApiModelValidationAttribute.cs
  6. 5
      src/Squidex.Web/ApiPermissionAttribute.cs
  7. 2
      src/Squidex.Web/AssetRequestSizeLimitAttribute.cs
  8. 2
      src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs
  9. 2
      src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs
  10. 2
      src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs
  11. 2
      src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs
  12. 6
      src/Squidex.Web/Constants.cs
  13. 2
      src/Squidex.Web/ETagExtensions.cs
  14. 2
      src/Squidex.Web/ETagFilter.cs
  15. 2
      src/Squidex.Web/ETagOptions.cs
  16. 10
      src/Squidex.Web/EntityCreatedDto.cs
  17. 14
      src/Squidex.Web/ErrorDto.cs
  18. 3
      src/Squidex.Web/Extensions.cs
  19. 3
      src/Squidex.Web/FileCallbackResult.cs
  20. 2
      src/Squidex.Web/IApiCostsFeature.cs
  21. 2
      src/Squidex.Web/IAppFeature.cs
  22. 2
      src/Squidex.Web/IGenerateEtag.cs
  23. 2
      src/Squidex.Web/MeasureResultFilter.cs
  24. 2
      src/Squidex.Web/MyJsonInheritanceConverter.cs
  25. 6
      src/Squidex.Web/Pipeline/ActionContextLogAppender.cs
  26. 2
      src/Squidex.Web/Pipeline/ApiCostsFilter.cs
  27. 2
      src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs
  28. 2
      src/Squidex.Web/Pipeline/AppResolver.cs
  29. 2
      src/Squidex.Web/Pipeline/CleanupHostMiddleware.cs
  30. 7
      src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs
  31. 2
      src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs
  32. 2
      src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs
  33. 2
      src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs
  34. 7
      src/Squidex.Web/Services/UrlGenerator.cs
  35. 23
      src/Squidex.Web/Squidex.Web.csproj
  36. 4
      src/Squidex.Web/UrlsOptions.cs
  37. 4
      src/Squidex.Web/UsageOptions.cs
  38. 3
      src/Squidex/Areas/Api/Config/Swagger/ScopesProcessor.cs
  39. 6
      src/Squidex/Areas/Api/Config/Swagger/SecurityProcessor.cs
  40. 4
      src/Squidex/Areas/Api/Config/Swagger/ThemeProcessor.cs
  41. 2
      src/Squidex/Areas/Api/Controllers/ApiController.cs
  42. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs
  43. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs
  44. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs
  45. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs
  46. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs
  47. 2
      src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs
  48. 2
      src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs
  49. 2
      src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs
  50. 2
      src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs
  51. 2
      src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs
  52. 2
      src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs
  53. 2
      src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs
  54. 2
      src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs
  55. 2
      src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs
  56. 2
      src/Squidex/Areas/Api/Controllers/Contents/ContentSwaggerController.cs
  57. 2
      src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs
  58. 2
      src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemaSwaggerGenerator.cs
  59. 6
      src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasSwaggerGenerator.cs
  60. 2
      src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs
  61. 2
      src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs
  62. 2
      src/Squidex/Areas/Api/Controllers/History/HistoryController.cs
  63. 2
      src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs
  64. 2
      src/Squidex/Areas/Api/Controllers/News/NewsController.cs
  65. 2
      src/Squidex/Areas/Api/Controllers/Ping/PingController.cs
  66. 2
      src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs
  67. 1
      src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs
  68. 2
      src/Squidex/Areas/Api/Controllers/Rules/Models/RuleDto.cs
  69. 1
      src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs
  70. 2
      src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs
  71. 1
      src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs
  72. 2
      src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs
  73. 2
      src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs
  74. 2
      src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs
  75. 7
      src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs
  76. 2
      src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs
  77. 2
      src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs
  78. 3
      src/Squidex/Areas/Api/Controllers/UI/UIController.cs
  79. 2
      src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs
  80. 2
      src/Squidex/Areas/Api/Controllers/Users/UsersController.cs
  81. 2
      src/Squidex/Areas/Api/Startup.cs
  82. 2
      src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs
  83. 8
      src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs
  84. 2
      src/Squidex/Areas/IdentityServer/Startup.cs
  85. 2
      src/Squidex/Areas/OrleansDashboard/Startup.cs
  86. 2
      src/Squidex/Areas/Portal/Startup.cs
  87. 3
      src/Squidex/Config/Authentication/IdentityServerServices.cs
  88. 1
      src/Squidex/Config/Authentication/OidcServices.cs
  89. 9
      src/Squidex/Config/Domain/EntitiesServices.cs
  90. 2
      src/Squidex/Config/Domain/LoggingServices.cs
  91. 3
      src/Squidex/Config/Domain/SubscriptionServices.cs
  92. 1
      src/Squidex/Config/Orleans/OrleansServices.cs
  93. 2
      src/Squidex/Config/Web/WebExtensions.cs
  94. 3
      src/Squidex/Config/Web/WebServices.cs
  95. 4
      src/Squidex/Pipeline/Swagger/NSwagHelper.cs
  96. 1
      src/Squidex/Squidex.csproj
  97. 11
      src/Squidex/WebStartup.cs
  98. 2
      tests/Squidex.Web.Tests/CommandMiddlewares/ETagCommandMiddlewareTests.cs
  99. 2
      tests/Squidex.Web.Tests/CommandMiddlewares/EnrichWithActorCommandMiddlewareTests.cs
  100. 3
      tests/Squidex.Web.Tests/CommandMiddlewares/EnrichWithAppIdCommandMiddlewareTests.cs

46
Squidex.sln

@ -30,10 +30,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrate_00", "tools\Migrate
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Shared", "src\Squidex.Shared\Squidex.Shared.csproj", "{5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Shared", "src\Squidex.Shared\Squidex.Shared.csproj", "{5E75AB7D-6F01-4313-AFF1-7F7128FFD71F}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{C9809D59-6665-471E-AD87-5AC624C65892}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "users", "users", "{C0D540F0-9158-4528-BFD8-BEAE6EAE45EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users", "src\Squidex.Domain.Users\Squidex.Domain.Users.csproj", "{F7771E22-47BD-45C4-A133-FD7F1DE27CA0}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users", "src\Squidex.Domain.Users\Squidex.Domain.Users.csproj", "{F7771E22-47BD-45C4-A133-FD7F1DE27CA0}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users.MongoDb", "src\Squidex.Domain.Users.MongoDb\Squidex.Domain.Users.MongoDb.csproj", "{27CF800D-890F-4882-BF05-44EC3233537D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Users.MongoDb", "src\Squidex.Domain.Users.MongoDb\Squidex.Domain.Users.MongoDb.csproj", "{27CF800D-890F-4882-BF05-44EC3233537D}"
@ -61,12 +57,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Domain.Apps.Entitie
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrate_01", "tools\Migrate_01\Migrate_01.csproj", "{A4823E14-C0E5-4A4D-B28F-27424C25C3C7}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migrate_01", "tools\Migrate_01\Migrate_01.csproj", "{A4823E14-C0E5-4A4D-B28F-27424C25C3C7}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Tests", "tests\Squidex.Tests\Squidex.Tests.csproj", "{7E8CC864-4C6E-496F-A672-9F9AD8874835}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Web.Tests", "tests\Squidex.Web.Tests\Squidex.Web.Tests.csproj", "{7E8CC864-4C6E-496F-A672-9F9AD8874835}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "extensions", "extensions", "{FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "extensions", "extensions", "{FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Extensions", "extensions\Squidex.Extensions\Squidex.Extensions.csproj", "{F3C41B82-6A67-409A-B7FE-54543EE4F38B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squidex.Extensions", "extensions\Squidex.Extensions\Squidex.Extensions.csproj", "{F3C41B82-6A67-409A-B7FE-54543EE4F38B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{7EDE8CF1-B1E4-4005-B154-834B944E0D7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squidex.Web", "src\Squidex.Web\Squidex.Web.csproj", "{5B2D251F-46E3-486A-AE16-E3FE06B559ED}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -337,35 +337,47 @@ Global
{F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x64.Build.0 = Release|Any CPU {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x64.Build.0 = Release|Any CPU
{F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.ActiveCfg = Release|Any CPU {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.ActiveCfg = Release|Any CPU
{F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.Build.0 = Release|Any CPU {F3C41B82-6A67-409A-B7FE-54543EE4F38B}.Release|x86.Build.0 = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x64.ActiveCfg = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x64.Build.0 = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Debug|x86.Build.0 = Debug|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|Any CPU.Build.0 = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x64.ActiveCfg = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x64.Build.0 = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x86.ActiveCfg = Release|Any CPU
{5B2D251F-46E3-486A-AE16-E3FE06B559ED}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {BD1C30A8-8FFA-4A92-A9BD-B67B1CDDD84C} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{25F66C64-058A-4D44-BC0C-F12A054F9A91} = {C9809D59-6665-471E-AD87-5AC624C65892} {25F66C64-058A-4D44-BC0C-F12A054F9A91} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{7FD0A92B-7862-4BB1-932B-B52A9CACB56B} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {7FD0A92B-7862-4BB1-932B-B52A9CACB56B} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{FD0AFD44-7A93-4F9E-B5ED-72582392E435} = {C9809D59-6665-471E-AD87-5AC624C65892} {FD0AFD44-7A93-4F9E-B5ED-72582392E435} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{6A811927-3C37-430A-90F4-503E37123956} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {6A811927-3C37-430A-90F4-503E37123956} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{D7166C56-178A-4457-B56A-C615C7450DEE} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {D7166C56-178A-4457-B56A-C615C7450DEE} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{C1E5BBB6-6B6A-4DE5-B19D-0538304DE343} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {C1E5BBB6-6B6A-4DE5-B19D-0538304DE343} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{945871B1-77B8-43FB-B53C-27CF385AB756} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {945871B1-77B8-43FB-B53C-27CF385AB756} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{B51126A8-0D75-4A79-867D-10724EC6AC84} = {94207AA6-4923-4183-A558-E0F8196B8CA3} {B51126A8-0D75-4A79-867D-10724EC6AC84} = {94207AA6-4923-4183-A558-E0F8196B8CA3}
{5E75AB7D-6F01-4313-AFF1-7F7128FFD71F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {5E75AB7D-6F01-4313-AFF1-7F7128FFD71F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{C9809D59-6665-471E-AD87-5AC624C65892} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} {F7771E22-47BD-45C4-A133-FD7F1DE27CA0} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A}
{C0D540F0-9158-4528-BFD8-BEAE6EAE45EA} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A} {27CF800D-890F-4882-BF05-44EC3233537D} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A}
{F7771E22-47BD-45C4-A133-FD7F1DE27CA0} = {C0D540F0-9158-4528-BFD8-BEAE6EAE45EA} {42184546-E3CB-4D4F-9495-43979B9C63B9} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A}
{27CF800D-890F-4882-BF05-44EC3233537D} = {C0D540F0-9158-4528-BFD8-BEAE6EAE45EA}
{42184546-E3CB-4D4F-9495-43979B9C63B9} = {C0D540F0-9158-4528-BFD8-BEAE6EAE45EA}
{EF75E488-1324-4E18-A1BD-D3A05AE67B1F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {EF75E488-1324-4E18-A1BD-D3A05AE67B1F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{7931187E-A1E6-4F89-8BC8-20A1E445579F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF} {7931187E-A1E6-4F89-8BC8-20A1E445579F} = {8CF53B92-5EB1-461D-98F8-70DA9B603FBF}
{F0A83301-50A5-40EA-A1A2-07C7858F5A3F} = {C9809D59-6665-471E-AD87-5AC624C65892} {F0A83301-50A5-40EA-A1A2-07C7858F5A3F} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{6B3F75B6-5888-468E-BA4F-4FC725DAEF31} = {C9809D59-6665-471E-AD87-5AC624C65892} {6B3F75B6-5888-468E-BA4F-4FC725DAEF31} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{79FEF326-CA5E-4698-B2BA-C16A4580B4D5} = {C9809D59-6665-471E-AD87-5AC624C65892} {79FEF326-CA5E-4698-B2BA-C16A4580B4D5} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{AA003372-CD8D-4DBC-962C-F61E0C93CF05} = {C9809D59-6665-471E-AD87-5AC624C65892} {AA003372-CD8D-4DBC-962C-F61E0C93CF05} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{7DA5B308-D950-4496-93D5-21D6C4D91644} = {C9809D59-6665-471E-AD87-5AC624C65892} {7DA5B308-D950-4496-93D5-21D6C4D91644} = {4C6B06C2-6D77-4E0E-AE32-D7050236433A}
{A4823E14-C0E5-4A4D-B28F-27424C25C3C7} = {94207AA6-4923-4183-A558-E0F8196B8CA3} {A4823E14-C0E5-4A4D-B28F-27424C25C3C7} = {94207AA6-4923-4183-A558-E0F8196B8CA3}
{7E8CC864-4C6E-496F-A672-9F9AD8874835} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A}
{F3C41B82-6A67-409A-B7FE-54543EE4F38B} = {FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52} {F3C41B82-6A67-409A-B7FE-54543EE4F38B} = {FB8BC3A2-2010-4C3C-A87D-D4A98C05EE52}
{5B2D251F-46E3-486A-AE16-E3FE06B559ED} = {7EDE8CF1-B1E4-4005-B154-834B944E0D7A}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {02F2E872-3141-44F5-BD6A-33CD84E9FE08} SolutionGuid = {02F2E872-3141-44F5-BD6A-33CD84E9FE08}

60
src/Squidex.Web/ApiController.cs

@ -0,0 +1,60 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands;
namespace Squidex.Web
{
[Area("Api")]
[ApiController]
[ApiExceptionFilter]
[ApiModelValidation(false)]
public abstract class ApiController : Controller
{
protected ICommandBus CommandBus { get; }
protected IAppEntity App
{
get
{
var appFeature = HttpContext.Features.Get<IAppFeature>();
if (appFeature == null)
{
throw new InvalidOperationException("Not in a app context.");
}
return appFeature.App;
}
}
protected Guid AppId
{
get { return App.Id; }
}
protected ApiController(ICommandBus commandBus)
{
Guard.NotNull(commandBus, nameof(commandBus));
CommandBus = commandBus;
}
public override void OnActionExecuting(ActionExecutingContext context)
{
if (!context.HttpContext.Request.PathBase.StartsWithSegments("/api"))
{
context.Result = new RedirectResult("/");
}
}
}
}

3
src/Squidex/Pipeline/ApiCostsAttribute.cs → src/Squidex.Web/ApiCostsAttribute.cs

@ -7,8 +7,9 @@
using System; using System;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Squidex.Web.Pipeline;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public sealed class ApiCostsAttribute : ServiceFilterAttribute, IApiCostsFeature public sealed class ApiCostsAttribute : ServiceFilterAttribute, IApiCostsFeature

2
src/Squidex/Pipeline/ApiExceptionFilterAttribute.cs → src/Squidex.Web/ApiExceptionFilterAttribute.cs

@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using Squidex.Infrastructure; using Squidex.Infrastructure;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ApiExceptionFilterAttribute : ActionFilterAttribute, IExceptionFilter public sealed class ApiExceptionFilterAttribute : ActionFilterAttribute, IExceptionFilter
{ {

2
src/Squidex/Pipeline/ApiModelValidationAttribute.cs → src/Squidex.Web/ApiModelValidationAttribute.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Newtonsoft.Json; using Newtonsoft.Json;
using Squidex.Infrastructure; using Squidex.Infrastructure;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ApiModelValidationAttribute : ActionFilterAttribute public sealed class ApiModelValidationAttribute : ActionFilterAttribute
{ {

5
src/Squidex/Pipeline/ApiPermissionAttribute.cs → src/Squidex.Web/ApiPermissionAttribute.cs

@ -7,7 +7,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityServer4.AccessTokenValidation;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
@ -15,7 +14,7 @@ using Squidex.Infrastructure.Security;
using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Tasks;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ApiPermissionAttribute : AuthorizeAttribute, IAsyncActionFilter public sealed class ApiPermissionAttribute : AuthorizeAttribute, IAsyncActionFilter
{ {
@ -28,7 +27,7 @@ namespace Squidex.Pipeline
public ApiPermissionAttribute(params string[] ids) public ApiPermissionAttribute(params string[] ids)
{ {
AuthenticationSchemes = IdentityServerAuthenticationDefaults.AuthenticationScheme; AuthenticationSchemes = "Bearer";
permissionIds = ids; permissionIds = ids;
} }

2
src/Squidex/Pipeline/AssetRequestSizeLimitAttribute.cs → src/Squidex.Web/AssetRequestSizeLimitAttribute.cs

@ -12,7 +12,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class AssetRequestSizeLimitAttribute : Attribute, IFilterFactory, IOrderedFilter public sealed class AssetRequestSizeLimitAttribute : Attribute, IFilterFactory, IOrderedFilter

2
src/Squidex/Pipeline/CommandMiddlewares/ETagCommandMiddleware.cs → src/Squidex.Web/CommandMiddlewares/ETagCommandMiddleware.cs

@ -13,7 +13,7 @@ using Microsoft.Net.Http.Headers;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public class ETagCommandMiddleware : ICommandMiddleware public class ETagCommandMiddleware : ICommandMiddleware
{ {

2
src/Squidex/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs → src/Squidex.Web/CommandMiddlewares/EnrichWithActorCommandMiddleware.cs

@ -13,7 +13,7 @@ using Squidex.Domain.Apps.Entities;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public class EnrichWithActorCommandMiddleware : ICommandMiddleware public class EnrichWithActorCommandMiddleware : ICommandMiddleware
{ {

2
src/Squidex/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs → src/Squidex.Web/CommandMiddlewares/EnrichWithAppIdCommandMiddleware.cs

@ -13,7 +13,7 @@ using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public sealed class EnrichWithAppIdCommandMiddleware : ICommandMiddleware public sealed class EnrichWithAppIdCommandMiddleware : ICommandMiddleware
{ {

2
src/Squidex/Pipeline/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs → src/Squidex.Web/CommandMiddlewares/EnrichWithSchemaIdCommandMiddleware.cs

@ -14,7 +14,7 @@ using Squidex.Domain.Apps.Entities.Schemas.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public sealed class EnrichWithSchemaIdCommandMiddleware : ICommandMiddleware public sealed class EnrichWithSchemaIdCommandMiddleware : ICommandMiddleware
{ {

6
src/Squidex/Config/Constants.cs → src/Squidex.Web/Constants.cs

@ -5,9 +5,9 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
using IdentityServer4.Models; using Squidex.Infrastructure;
namespace Squidex.Config namespace Squidex.Web
{ {
public static class Constants public static class Constants
{ {
@ -33,7 +33,7 @@ namespace Squidex.Config
public static readonly string InternalClientId = "squidex-internal"; public static readonly string InternalClientId = "squidex-internal";
public static readonly string InternalClientSecret = "squidex-internal".Sha256(); public static readonly string InternalClientSecret = "squidex-internal".Sha256Base64();
public static readonly string IdentityServerPrefix = "/identity-server"; public static readonly string IdentityServerPrefix = "/identity-server";
} }

2
src/Squidex/Pipeline/ETagExtensions.cs → src/Squidex.Web/ETagExtensions.cs

@ -11,7 +11,7 @@ using System.Text;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public static class ETagExtensions public static class ETagExtensions
{ {

2
src/Squidex/Pipeline/ETagFilter.cs → src/Squidex.Web/ETagFilter.cs

@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ETagFilter : IAsyncActionFilter public sealed class ETagFilter : IAsyncActionFilter
{ {

2
src/Squidex/Pipeline/ETagOptions.cs → src/Squidex.Web/ETagOptions.cs

@ -5,7 +5,7 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ETagOptions public sealed class ETagOptions
{ {

10
src/Squidex/Pipeline/EntityCreatedDto.cs → src/Squidex.Web/EntityCreatedDto.cs

@ -8,19 +8,15 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class EntityCreatedDto public sealed class EntityCreatedDto
{ {
/// <summary>
/// Id of the created entity.
/// </summary>
[Required] [Required]
[Display(Description = "Id of the created entity.")]
public string Id { get; set; } public string Id { get; set; }
/// <summary> [Display(Description = "The new version of the entity.")]
/// The new version of the entity.
/// </summary>
public long Version { get; set; } public long Version { get; set; }
public static EntityCreatedDto FromResult<T>(EntityCreatedResult<T> result) public static EntityCreatedDto FromResult<T>(EntityCreatedResult<T> result)

14
src/Squidex/Pipeline/ErrorDto.cs → src/Squidex.Web/ErrorDto.cs

@ -7,24 +7,18 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class ErrorDto public sealed class ErrorDto
{ {
/// <summary>
/// Error message.
/// </summary>
[Required] [Required]
[Display(Description = "Error message.")]
public string Message { get; set; } public string Message { get; set; }
/// <summary> [Display(Description = "Detailed error messages.")]
/// Detailed error messages.
/// </summary>
public string[] Details { get; set; } public string[] Details { get; set; }
/// <summary> [Display(Description = "Status code of the http response.")]
/// Status code of the http response.
/// </summary>
public int? StatusCode { get; set; } = 400; public int? StatusCode { get; set; } = 400;
} }
} }

3
src/Squidex/Pipeline/Extensions.cs → src/Squidex.Web/Extensions.cs

@ -6,10 +6,9 @@
// ========================================================================== // ==========================================================================
using System.Security.Claims; using System.Security.Claims;
using Squidex.Config;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public static class Extensions public static class Extensions
{ {

3
src/Squidex/Pipeline/FileCallbackResult.cs → src/Squidex.Web/FileCallbackResult.cs

@ -10,8 +10,9 @@ using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Web.Pipeline;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public sealed class FileCallbackResult : FileResult public sealed class FileCallbackResult : FileResult
{ {

2
src/Squidex/Pipeline/IApiCostsFeature.cs → src/Squidex.Web/IApiCostsFeature.cs

@ -5,7 +5,7 @@
// All rights reserved. Licensed under the MIT license. // All rights reserved. Licensed under the MIT license.
// ========================================================================== // ==========================================================================
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public interface IApiCostsFeature public interface IApiCostsFeature
{ {

2
src/Squidex/Pipeline/IAppFeature.cs → src/Squidex.Web/IAppFeature.cs

@ -7,7 +7,7 @@
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public interface IAppFeature public interface IAppFeature
{ {

2
src/Squidex/Pipeline/IGenerateEtag.cs → src/Squidex.Web/IGenerateEtag.cs

@ -7,7 +7,7 @@
using System; using System;
namespace Squidex.Pipeline namespace Squidex.Web
{ {
public interface IGenerateETag public interface IGenerateETag
{ {

2
src/Squidex/Pipeline/MeasureResultFilter.cs → src/Squidex.Web/MeasureResultFilter.cs

@ -9,7 +9,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.Filters;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class MeasureResultFilter : IAsyncResultFilter, IAsyncActionFilter public sealed class MeasureResultFilter : IAsyncResultFilter, IAsyncActionFilter
{ {

2
src/Squidex/Areas/Api/Controllers/MyJsonInheritanceConverter.cs → src/Squidex.Web/MyJsonInheritanceConverter.cs

@ -16,7 +16,7 @@ using Squidex.Infrastructure;
#pragma warning disable RECS0108 // Warns about static fields in generic types #pragma warning disable RECS0108 // Warns about static fields in generic types
namespace Squidex.Areas.Api.Controllers namespace Squidex.Web
{ {
public class MyJsonInheritanceConverter<T> : JsonInheritanceConverter public class MyJsonInheritanceConverter<T> : JsonInheritanceConverter
{ {

6
src/Squidex/Pipeline/ActionContextLogAppender.cs → src/Squidex.Web/Pipeline/ActionContextLogAppender.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Infrastructure;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class ActionContextLogAppender : ILogAppender public sealed class ActionContextLogAppender : ILogAppender
{ {
@ -57,9 +57,9 @@ namespace Squidex.Pipeline
{ {
w.WriteObject("routeValues", actionContext.ActionDescriptor.RouteValues, (routeValues, r) => w.WriteObject("routeValues", actionContext.ActionDescriptor.RouteValues, (routeValues, r) =>
{ {
foreach (var (key, val) in routeValues) foreach (var kvp in routeValues)
{ {
r.WriteProperty(key, val); r.WriteProperty(kvp.Key, kvp.Value);
} }
}); });
} }

2
src/Squidex/Pipeline/ApiCostsFilter.cs → src/Squidex.Web/Pipeline/ApiCostsFilter.cs

@ -15,7 +15,7 @@ using Squidex.Infrastructure.Log;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Squidex.Infrastructure.UsageTracking; using Squidex.Infrastructure.UsageTracking;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class ApiCostsFilter : IAsyncActionFilter, IFilterContainer public sealed class ApiCostsFilter : IAsyncActionFilter, IFilterContainer
{ {

2
src/Squidex/Pipeline/ApiPermissionUnifier.cs → src/Squidex.Web/Pipeline/ApiPermissionUnifier.cs

@ -12,7 +12,7 @@ using Microsoft.AspNetCore.Authentication;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class ApiPermissionUnifier : IClaimsTransformation public sealed class ApiPermissionUnifier : IClaimsTransformation
{ {

2
src/Squidex/Pipeline/AppResolver.cs → src/Squidex.Web/Pipeline/AppResolver.cs

@ -17,7 +17,7 @@ using Squidex.Infrastructure.Security;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class AppResolver : IAsyncActionFilter public sealed class AppResolver : IAsyncActionFilter
{ {

2
src/Squidex/Pipeline/CleanupHostMiddleware.cs → src/Squidex.Web/Pipeline/CleanupHostMiddleware.cs

@ -8,7 +8,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public class CleanupHostMiddleware public class CleanupHostMiddleware
{ {

7
src/Squidex/Pipeline/EnforceHttpsMiddleware.cs → src/Squidex.Web/Pipeline/EnforceHttpsMiddleware.cs

@ -9,15 +9,14 @@ using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Squidex.Config;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class EnforceHttpsMiddleware : IMiddleware public sealed class EnforceHttpsMiddleware : IMiddleware
{ {
private readonly IOptions<MyUrlsOptions> urls; private readonly IOptions<UrlsOptions> urls;
public EnforceHttpsMiddleware(IOptions<MyUrlsOptions> urls) public EnforceHttpsMiddleware(IOptions<UrlsOptions> urls)
{ {
this.urls = urls; this.urls = urls;
} }

2
src/Squidex/Pipeline/FileCallbackResultExecutor.cs → src/Squidex.Web/Pipeline/FileCallbackResultExecutor.cs

@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class FileCallbackResultExecutor : FileResultExecutorBase public sealed class FileCallbackResultExecutor : FileResultExecutorBase
{ {

2
src/Squidex/Pipeline/LocalCacheMiddleware.cs → src/Squidex.Web/Pipeline/LocalCacheMiddleware.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Http;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Caching; using Squidex.Infrastructure.Caching;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class LocalCacheMiddleware : IMiddleware public sealed class LocalCacheMiddleware : IMiddleware
{ {

2
src/Squidex/Pipeline/RequestLogPerformanceMiddleware.cs → src/Squidex.Web/Pipeline/RequestLogPerformanceMiddleware.cs

@ -11,7 +11,7 @@ using Squidex.Infrastructure;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
namespace Squidex.Pipeline namespace Squidex.Web.Pipeline
{ {
public sealed class RequestLogPerformanceMiddleware : IMiddleware public sealed class RequestLogPerformanceMiddleware : IMiddleware
{ {

7
src/Squidex/Pipeline/UrlGenerator.cs → src/Squidex.Web/Services/UrlGenerator.cs

@ -7,7 +7,6 @@
using System; using System;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Squidex.Config;
using Squidex.Domain.Apps.Core.ConvertContent; using Squidex.Domain.Apps.Core.ConvertContent;
using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.HandleRules;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
@ -18,16 +17,16 @@ using Squidex.Domain.Apps.Entities.Schemas;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
namespace Squidex.Pipeline namespace Squidex.Web.Services
{ {
public sealed class UrlGenerator : IGraphQLUrlGenerator, IRuleUrlGenerator, IAssetUrlGenerator public sealed class UrlGenerator : IGraphQLUrlGenerator, IRuleUrlGenerator, IAssetUrlGenerator
{ {
private readonly IAssetStore assetStore; private readonly IAssetStore assetStore;
private readonly MyUrlsOptions urlsOptions; private readonly UrlsOptions urlsOptions;
public bool CanGenerateAssetSourceUrl { get; } public bool CanGenerateAssetSourceUrl { get; }
public UrlGenerator(IOptions<MyUrlsOptions> urlsOptions, IAssetStore assetStore, bool allowAssetSourceUrl) public UrlGenerator(IOptions<UrlsOptions> urlsOptions, IAssetStore assetStore, bool allowAssetSourceUrl)
{ {
this.assetStore = assetStore; this.assetStore = assetStore;
this.urlsOptions = urlsOptions.Value; this.urlsOptions = urlsOptions.Value;

23
src/Squidex.Web/Squidex.Web.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Squidex.Domain.Apps.Entities\Squidex.Domain.Apps.Entities.csproj" />
<ProjectReference Include="..\Squidex.Infrastructure\Squidex.Infrastructure.csproj" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\..\Squidex.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
</Project>

4
src/Squidex/Config/MyUrlsOptions.cs → src/Squidex.Web/UrlsOptions.cs

@ -7,9 +7,9 @@
using Squidex.Infrastructure; using Squidex.Infrastructure;
namespace Squidex.Config namespace Squidex.Web
{ {
public sealed class MyUrlsOptions public sealed class UrlsOptions
{ {
public bool EnforceHTTPS { get; set; } public bool EnforceHTTPS { get; set; }

4
src/Squidex/Config/MyUsageOptions.cs → src/Squidex.Web/UsageOptions.cs

@ -7,9 +7,9 @@
using Squidex.Domain.Apps.Entities.Apps.Services.Implementations; using Squidex.Domain.Apps.Entities.Apps.Services.Implementations;
namespace Squidex.Config namespace Squidex.Web
{ {
public class MyUsageOptions public sealed class UsageOptions
{ {
public ConfigAppLimitsPlan[] Plans { get; set; } public ConfigAppLimitsPlan[] Plans { get; set; }
} }

3
src/Squidex/Areas/Api/Config/Swagger/ScopesProcessor.cs

@ -13,9 +13,8 @@ using Microsoft.AspNetCore.Authorization;
using NSwag; using NSwag;
using NSwag.SwaggerGeneration.Processors; using NSwag.SwaggerGeneration.Processors;
using NSwag.SwaggerGeneration.Processors.Contexts; using NSwag.SwaggerGeneration.Processors.Contexts;
using Squidex.Config;
using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Tasks;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Config.Swagger namespace Squidex.Areas.Api.Config.Swagger
{ {

6
src/Squidex/Areas/Api/Config/Swagger/SecurityProcessor.cs

@ -9,19 +9,19 @@ using System.Collections.Generic;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using NSwag; using NSwag;
using NSwag.SwaggerGeneration.Processors.Security; using NSwag.SwaggerGeneration.Processors.Security;
using Squidex.Config;
using Squidex.Pipeline.Swagger; using Squidex.Pipeline.Swagger;
using Squidex.Web;
namespace Squidex.Areas.Api.Config.Swagger namespace Squidex.Areas.Api.Config.Swagger
{ {
public class SecurityProcessor : SecurityDefinitionAppender public class SecurityProcessor : SecurityDefinitionAppender
{ {
public SecurityProcessor(IOptions<MyUrlsOptions> urlOptions) public SecurityProcessor(IOptions<UrlsOptions> urlOptions)
: base(Constants.SecurityDefinition, CreateOAuthSchema(urlOptions.Value)) : base(Constants.SecurityDefinition, CreateOAuthSchema(urlOptions.Value))
{ {
} }
private static SwaggerSecurityScheme CreateOAuthSchema(MyUrlsOptions urlOptions) private static SwaggerSecurityScheme CreateOAuthSchema(UrlsOptions urlOptions)
{ {
var securityScheme = new SwaggerSecurityScheme(); var securityScheme = new SwaggerSecurityScheme();

4
src/Squidex/Areas/Api/Config/Swagger/ThemeProcessor.cs

@ -10,8 +10,8 @@ using System.Threading.Tasks;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using NSwag.SwaggerGeneration.Processors; using NSwag.SwaggerGeneration.Processors;
using NSwag.SwaggerGeneration.Processors.Contexts; using NSwag.SwaggerGeneration.Processors.Contexts;
using Squidex.Config;
using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Tasks;
using Squidex.Web;
namespace Squidex.Areas.Api.Config.Swagger namespace Squidex.Areas.Api.Config.Swagger
{ {
@ -21,7 +21,7 @@ namespace Squidex.Areas.Api.Config.Swagger
private readonly string url; private readonly string url;
public ThemeProcessor(IOptions<MyUrlsOptions> urlOptions) public ThemeProcessor(IOptions<UrlsOptions> urlOptions)
{ {
url = urlOptions.Value.BuildUrl("images/logo-white.png", false); url = urlOptions.Value.BuildUrl("images/logo-white.png", false);
} }

2
src/Squidex/Areas/Api/Controllers/ApiController.cs

@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers namespace Squidex.Areas.Api.Controllers
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppClientsController.cs

@ -12,8 +12,8 @@ using Microsoft.Net.Http.Headers;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppContributorsController.cs

@ -13,8 +13,8 @@ using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs

@ -13,8 +13,8 @@ using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppPatternsController.cs

@ -13,8 +13,8 @@ using Microsoft.Net.Http.Headers;
using Squidex.Areas.Api.Controllers.Apps.Models; using Squidex.Areas.Api.Controllers.Apps.Models;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppRolesController.cs

@ -13,8 +13,8 @@ using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Domain.Apps.Entities.Apps.Commands; using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/AppsController.cs

@ -16,9 +16,9 @@ using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps namespace Squidex.Areas.Api.Controllers.Apps
{ {

2
src/Squidex/Areas/Api/Controllers/Apps/Models/AppDto.cs

@ -14,8 +14,8 @@ using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Reflection;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Apps.Models namespace Squidex.Areas.Api.Controllers.Apps.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Assets/AssetContentController.cs

@ -15,7 +15,7 @@ using Squidex.Infrastructure;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
using Squidex.Pipeline; using Squidex.Web;
#pragma warning disable 1573 #pragma warning disable 1573

2
src/Squidex/Areas/Api/Controllers/Assets/AssetsController.cs

@ -23,8 +23,8 @@ using Squidex.Domain.Apps.Entities.Assets.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Assets namespace Squidex.Areas.Api.Controllers.Assets
{ {

2
src/Squidex/Areas/Api/Controllers/Assets/Models/AssetDto.cs

@ -12,7 +12,7 @@ using NodaTime;
using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Reflection;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Assets.Models namespace Squidex.Areas.Api.Controllers.Assets.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Backups/BackupContentController.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Backups namespace Squidex.Areas.Api.Controllers.Backups
{ {

2
src/Squidex/Areas/Api/Controllers/Backups/BackupsController.cs

@ -15,8 +15,8 @@ using Squidex.Domain.Apps.Entities.Backup;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Tasks; using Squidex.Infrastructure.Tasks;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Backups namespace Squidex.Areas.Api.Controllers.Backups
{ {

2
src/Squidex/Areas/Api/Controllers/Backups/RestoreController.cs

@ -13,8 +13,8 @@ using Squidex.Domain.Apps.Entities.Backup;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Orleans;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Backups namespace Squidex.Areas.Api.Controllers.Backups
{ {

2
src/Squidex/Areas/Api/Controllers/Comments/CommentsController.cs

@ -15,8 +15,8 @@ using Squidex.Domain.Apps.Entities.Comments;
using Squidex.Domain.Apps.Entities.Comments.Commands; using Squidex.Domain.Apps.Entities.Comments.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Comments namespace Squidex.Areas.Api.Controllers.Comments
{ {

2
src/Squidex/Areas/Api/Controllers/Contents/ContentSwaggerController.cs

@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Mvc;
using Squidex.Areas.Api.Controllers.Contents.Generator; using Squidex.Areas.Api.Controllers.Contents.Generator;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Contents namespace Squidex.Areas.Api.Controllers.Contents
{ {

2
src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs

@ -20,9 +20,9 @@ using Squidex.Domain.Apps.Entities.Contents;
using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Domain.Apps.Entities.Contents.Commands;
using Squidex.Domain.Apps.Entities.Contents.GraphQL; using Squidex.Domain.Apps.Entities.Contents.GraphQL;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Contents namespace Squidex.Areas.Api.Controllers.Contents
{ {

2
src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemaSwaggerGenerator.cs

@ -10,13 +10,13 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using NJsonSchema; using NJsonSchema;
using NSwag; using NSwag;
using Squidex.Config;
using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core;
using Squidex.Domain.Apps.Core.GenerateJsonSchema; using Squidex.Domain.Apps.Core.GenerateJsonSchema;
using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Pipeline.Swagger; using Squidex.Pipeline.Swagger;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Contents.Generator namespace Squidex.Areas.Api.Controllers.Contents.Generator
{ {

6
src/Squidex/Areas/Api/Controllers/Contents/Generator/SchemasSwaggerGenerator.cs

@ -18,23 +18,23 @@ using NSwag.SwaggerGeneration;
using NSwag.SwaggerGeneration.Processors; using NSwag.SwaggerGeneration.Processors;
using NSwag.SwaggerGeneration.Processors.Contexts; using NSwag.SwaggerGeneration.Processors.Contexts;
using Squidex.Areas.Api.Config.Swagger; using Squidex.Areas.Api.Config.Swagger;
using Squidex.Config;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Domain.Apps.Entities.Schemas;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Pipeline.Swagger; using Squidex.Pipeline.Swagger;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Contents.Generator namespace Squidex.Areas.Api.Controllers.Contents.Generator
{ {
public sealed class SchemasSwaggerGenerator public sealed class SchemasSwaggerGenerator
{ {
private readonly MyUrlsOptions urlOptions; private readonly UrlsOptions urlOptions;
private readonly SwaggerDocumentSettings settings = new SwaggerDocumentSettings(); private readonly SwaggerDocumentSettings settings = new SwaggerDocumentSettings();
private SwaggerJsonSchemaGenerator schemaGenerator; private SwaggerJsonSchemaGenerator schemaGenerator;
private SwaggerDocument document; private SwaggerDocument document;
private JsonSchemaResolver schemaResolver; private JsonSchemaResolver schemaResolver;
public SchemasSwaggerGenerator(IOptions<MyUrlsOptions> urlOptions, IEnumerable<IDocumentProcessor> documentProcessors) public SchemasSwaggerGenerator(IOptions<UrlsOptions> urlOptions, IEnumerable<IDocumentProcessor> documentProcessors)
{ {
this.urlOptions = urlOptions.Value; this.urlOptions = urlOptions.Value;

2
src/Squidex/Areas/Api/Controllers/Contents/Models/ContentDto.cs

@ -16,7 +16,7 @@ using Squidex.Domain.Apps.Entities.Contents.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Reflection;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Contents.Models namespace Squidex.Areas.Api.Controllers.Contents.Models
{ {

2
src/Squidex/Areas/Api/Controllers/EventConsumers/EventConsumersController.cs

@ -13,8 +13,8 @@ using Squidex.Areas.Api.Controllers.EventConsumers.Models;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.EventSourcing.Grains; using Squidex.Infrastructure.EventSourcing.Grains;
using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Orleans;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.EventConsumers namespace Squidex.Areas.Api.Controllers.EventConsumers
{ {

2
src/Squidex/Areas/Api/Controllers/History/HistoryController.cs

@ -11,8 +11,8 @@ using Squidex.Areas.Api.Controllers.History.Models;
using Squidex.Domain.Apps.Entities.History; using Squidex.Domain.Apps.Entities.History;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.History namespace Squidex.Areas.Api.Controllers.History
{ {

2
src/Squidex/Areas/Api/Controllers/Languages/LanguagesController.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Languages namespace Squidex.Areas.Api.Controllers.Languages
{ {

2
src/Squidex/Areas/Api/Controllers/News/NewsController.cs

@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Mvc;
using Squidex.Areas.Api.Controllers.News.Models; using Squidex.Areas.Api.Controllers.News.Models;
using Squidex.Areas.Api.Controllers.News.Service; using Squidex.Areas.Api.Controllers.News.Service;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.News namespace Squidex.Areas.Api.Controllers.News
{ {

2
src/Squidex/Areas/Api/Controllers/Ping/PingController.cs

@ -7,8 +7,8 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Ping namespace Squidex.Areas.Api.Controllers.Ping
{ {

2
src/Squidex/Areas/Api/Controllers/Plans/AppPlansController.cs

@ -11,8 +11,8 @@ using Microsoft.Net.Http.Headers;
using Squidex.Areas.Api.Controllers.Plans.Models; using Squidex.Areas.Api.Controllers.Plans.Models;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Plans namespace Squidex.Areas.Api.Controllers.Plans
{ {

1
src/Squidex/Areas/Api/Controllers/Rules/Models/RuleActionConverter.cs

@ -8,6 +8,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Rules.Models namespace Squidex.Areas.Api.Controllers.Rules.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Rules/Models/RuleDto.cs

@ -14,7 +14,7 @@ using Squidex.Domain.Apps.Core.Rules;
using Squidex.Domain.Apps.Entities.Rules; using Squidex.Domain.Apps.Entities.Rules;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Reflection;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Rules.Models namespace Squidex.Areas.Api.Controllers.Rules.Models
{ {

1
src/Squidex/Areas/Api/Controllers/Rules/Models/RuleTriggerDto.cs

@ -10,6 +10,7 @@ using System.Linq;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Squidex.Domain.Apps.Core.Rules; using Squidex.Domain.Apps.Core.Rules;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Rules.Models namespace Squidex.Areas.Api.Controllers.Rules.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Rules/RulesController.cs

@ -19,8 +19,8 @@ using Squidex.Domain.Apps.Entities.Rules.Commands;
using Squidex.Domain.Apps.Entities.Rules.Repositories; using Squidex.Domain.Apps.Entities.Rules.Repositories;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Rules namespace Squidex.Areas.Api.Controllers.Rules
{ {

1
src/Squidex/Areas/Api/Controllers/Schemas/Models/FieldPropertiesDto.cs

@ -11,6 +11,7 @@ using System.Linq;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using Newtonsoft.Json; using Newtonsoft.Json;
using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Schemas.Models namespace Squidex.Areas.Api.Controllers.Schemas.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Schemas/Models/SchemaDto.cs

@ -11,7 +11,7 @@ using NodaTime;
using Squidex.Domain.Apps.Entities.Schemas; using Squidex.Domain.Apps.Entities.Schemas;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Reflection; using Squidex.Infrastructure.Reflection;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Schemas.Models namespace Squidex.Areas.Api.Controllers.Schemas.Models
{ {

2
src/Squidex/Areas/Api/Controllers/Schemas/SchemaFieldsController.cs

@ -10,8 +10,8 @@ using Microsoft.AspNetCore.Mvc;
using Squidex.Areas.Api.Controllers.Schemas.Models; using Squidex.Areas.Api.Controllers.Schemas.Models;
using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Domain.Apps.Entities.Schemas.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Schemas namespace Squidex.Areas.Api.Controllers.Schemas
{ {

2
src/Squidex/Areas/Api/Controllers/Schemas/SchemasController.cs

@ -15,8 +15,8 @@ using Squidex.Domain.Apps.Entities.Schemas;
using Squidex.Domain.Apps.Entities.Schemas.Commands; using Squidex.Domain.Apps.Entities.Schemas.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Schemas namespace Squidex.Areas.Api.Controllers.Schemas
{ {

7
src/Squidex/Areas/Api/Controllers/Statistics/UsagesController.cs

@ -13,14 +13,13 @@ using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Squidex.Areas.Api.Controllers.Statistics.Models; using Squidex.Areas.Api.Controllers.Statistics.Models;
using Squidex.Config;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Domain.Apps.Entities.Apps.Services; using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Domain.Apps.Entities.Assets; using Squidex.Domain.Apps.Entities.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.UsageTracking; using Squidex.Infrastructure.UsageTracking;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Statistics namespace Squidex.Areas.Api.Controllers.Statistics
{ {
@ -35,7 +34,7 @@ namespace Squidex.Areas.Api.Controllers.Statistics
private readonly IAppPlansProvider appPlansProvider; private readonly IAppPlansProvider appPlansProvider;
private readonly IAssetUsageTracker assetStatsRepository; private readonly IAssetUsageTracker assetStatsRepository;
private readonly IDataProtector dataProtector; private readonly IDataProtector dataProtector;
private readonly MyUrlsOptions urlsOptions; private readonly UrlsOptions urlsOptions;
public UsagesController( public UsagesController(
ICommandBus commandBus, ICommandBus commandBus,
@ -44,7 +43,7 @@ namespace Squidex.Areas.Api.Controllers.Statistics
IAppPlansProvider appPlansProvider, IAppPlansProvider appPlansProvider,
IAssetUsageTracker assetStatsRepository, IAssetUsageTracker assetStatsRepository,
IDataProtectionProvider dataProtection, IDataProtectionProvider dataProtection,
IOptions<MyUrlsOptions> urlsOptions) IOptions<UrlsOptions> urlsOptions)
: base(commandBus) : base(commandBus)
{ {
this.usageTracker = usageTracker; this.usageTracker = usageTracker;

2
src/Squidex/Areas/Api/Controllers/Translations/TranslationsController.cs

@ -10,8 +10,8 @@ using Microsoft.AspNetCore.Mvc;
using Squidex.Areas.Api.Controllers.Translations.Models; using Squidex.Areas.Api.Controllers.Translations.Models;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Translations; using Squidex.Infrastructure.Translations;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Translations namespace Squidex.Areas.Api.Controllers.Translations
{ {

2
src/Squidex/Config/MyUIOptions.cs → src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs

@ -7,7 +7,7 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Squidex.Config namespace Squidex.Areas.Api.Controllers.UI
{ {
public sealed class MyUIOptions public sealed class MyUIOptions
{ {

3
src/Squidex/Areas/Api/Controllers/UI/UIController.cs

@ -10,11 +10,10 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Orleans; using Orleans;
using Squidex.Areas.Api.Controllers.UI.Models; using Squidex.Areas.Api.Controllers.UI.Models;
using Squidex.Config;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Orleans;
using Squidex.Pipeline; using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.UI namespace Squidex.Areas.Api.Controllers.UI
{ {

2
src/Squidex/Areas/Api/Controllers/Users/UserManagementController.cs

@ -15,8 +15,8 @@ using Squidex.Domain.Users;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Users namespace Squidex.Areas.Api.Controllers.Users
{ {

2
src/Squidex/Areas/Api/Controllers/Users/UsersController.cs

@ -15,8 +15,8 @@ using Squidex.Areas.Api.Controllers.Users.Models;
using Squidex.Domain.Users; using Squidex.Domain.Users;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
using Squidex.Pipeline;
using Squidex.Shared.Users; using Squidex.Shared.Users;
using Squidex.Web;
namespace Squidex.Areas.Api.Controllers.Users namespace Squidex.Areas.Api.Controllers.Users
{ {

2
src/Squidex/Areas/Api/Startup.cs

@ -7,7 +7,7 @@
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Squidex.Areas.Api.Config.Swagger; using Squidex.Areas.Api.Config.Swagger;
using Squidex.Config; using Squidex.Web;
namespace Squidex.Areas.Api namespace Squidex.Areas.Api
{ {

2
src/Squidex/Areas/IdentityServer/Config/IdentityServerServices.cs

@ -16,9 +16,9 @@ using Microsoft.AspNetCore.DataProtection.Repositories;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Squidex.Config;
using Squidex.Domain.Users; using Squidex.Domain.Users;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
using Squidex.Web;
namespace Squidex.Areas.IdentityServer.Config namespace Squidex.Areas.IdentityServer.Config
{ {

8
src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs

@ -17,9 +17,9 @@ using Squidex.Config;
using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Apps;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Pipeline;
using Squidex.Shared; using Squidex.Shared;
using Squidex.Shared.Identity; using Squidex.Shared.Identity;
using Squidex.Web;
namespace Squidex.Areas.IdentityServer.Config namespace Squidex.Areas.IdentityServer.Config
{ {
@ -29,7 +29,7 @@ namespace Squidex.Areas.IdentityServer.Config
private readonly Dictionary<string, Client> staticClients = new Dictionary<string, Client>(StringComparer.OrdinalIgnoreCase); private readonly Dictionary<string, Client> staticClients = new Dictionary<string, Client>(StringComparer.OrdinalIgnoreCase);
public LazyClientStore( public LazyClientStore(
IOptions<MyUrlsOptions> urlsOptions, IOptions<UrlsOptions> urlsOptions,
IOptions<MyIdentityOptions> identityOptions, IOptions<MyIdentityOptions> identityOptions,
IAppProvider appProvider) IAppProvider appProvider)
{ {
@ -89,7 +89,7 @@ namespace Squidex.Areas.IdentityServer.Config
}; };
} }
private void CreateStaticClients(IOptions<MyUrlsOptions> urlsOptions, IOptions<MyIdentityOptions> identityOptions) private void CreateStaticClients(IOptions<UrlsOptions> urlsOptions, IOptions<MyIdentityOptions> identityOptions)
{ {
foreach (var client in CreateStaticClients(urlsOptions.Value, identityOptions.Value)) foreach (var client in CreateStaticClients(urlsOptions.Value, identityOptions.Value))
{ {
@ -97,7 +97,7 @@ namespace Squidex.Areas.IdentityServer.Config
} }
} }
private static IEnumerable<Client> CreateStaticClients(MyUrlsOptions urlsOptions, MyIdentityOptions identityOptions) private static IEnumerable<Client> CreateStaticClients(UrlsOptions urlsOptions, MyIdentityOptions identityOptions)
{ {
var frontendId = Constants.FrontendClient; var frontendId = Constants.FrontendClient;

2
src/Squidex/Areas/IdentityServer/Startup.cs

@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Areas.IdentityServer.Config; using Squidex.Areas.IdentityServer.Config;
using Squidex.Config; using Squidex.Web;
namespace Squidex.Areas.IdentityServer namespace Squidex.Areas.IdentityServer
{ {

2
src/Squidex/Areas/OrleansDashboard/Startup.cs

@ -8,7 +8,7 @@
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Orleans; using Orleans;
using Squidex.Areas.OrleansDashboard.Middlewares; using Squidex.Areas.OrleansDashboard.Middlewares;
using Squidex.Config; using Squidex.Web;
namespace Squidex.Areas.OrleansDashboard namespace Squidex.Areas.OrleansDashboard
{ {

2
src/Squidex/Areas/Portal/Startup.cs

@ -7,7 +7,7 @@
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Squidex.Areas.Portal.Middlewares; using Squidex.Areas.Portal.Middlewares;
using Squidex.Config; using Squidex.Web;
namespace Squidex.Areas.Portal namespace Squidex.Areas.Portal
{ {

3
src/Squidex/Config/Authentication/IdentityServerServices.cs

@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Web;
namespace Squidex.Config.Authentication namespace Squidex.Config.Authentication
{ {
@ -20,7 +21,7 @@ namespace Squidex.Config.Authentication
{ {
var apiScope = Constants.ApiScope; var apiScope = Constants.ApiScope;
var urlsOptions = config.GetSection("urls").Get<MyUrlsOptions>(); var urlsOptions = config.GetSection("urls").Get<UrlsOptions>();
if (!string.IsNullOrWhiteSpace(urlsOptions.BaseUrl)) if (!string.IsNullOrWhiteSpace(urlsOptions.BaseUrl))
{ {

1
src/Squidex/Config/Authentication/OidcServices.cs

@ -8,6 +8,7 @@
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Web;
namespace Squidex.Config.Authentication namespace Squidex.Config.Authentication
{ {

9
src/Squidex/Config/Domain/EntitiesServices.cs

@ -12,6 +12,7 @@ using Microsoft.Extensions.Options;
using Migrate_01; using Migrate_01;
using Migrate_01.Migrations; using Migrate_01.Migrations;
using Orleans; using Orleans;
using Squidex.Areas.Api.Controllers.UI;
using Squidex.Domain.Apps.Core.Apps; using Squidex.Domain.Apps.Core.Apps;
using Squidex.Domain.Apps.Core.ConvertContent; using Squidex.Domain.Apps.Core.ConvertContent;
using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.HandleRules;
@ -44,11 +45,11 @@ using Squidex.Domain.Apps.Entities.Tags;
using Squidex.Infrastructure.Assets; using Squidex.Infrastructure.Assets;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.EventSourcing; using Squidex.Infrastructure.EventSourcing;
using Squidex.Infrastructure.EventSourcing.Grains;
using Squidex.Infrastructure.Migrations; using Squidex.Infrastructure.Migrations;
using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Orleans;
using Squidex.Pipeline; using Squidex.Web;
using Squidex.Pipeline.CommandMiddlewares; using Squidex.Web.CommandMiddlewares;
using Squidex.Web.Services;
namespace Squidex.Config.Domain namespace Squidex.Config.Domain
{ {
@ -59,7 +60,7 @@ namespace Squidex.Config.Domain
var exposeSourceUrl = config.GetOptionalValue("assetStore:exposeSourceUrl", true); var exposeSourceUrl = config.GetOptionalValue("assetStore:exposeSourceUrl", true);
services.AddSingletonAs(c => new UrlGenerator( services.AddSingletonAs(c => new UrlGenerator(
c.GetRequiredService<IOptions<MyUrlsOptions>>(), c.GetRequiredService<IOptions<UrlsOptions>>(),
c.GetRequiredService<IAssetStore>(), c.GetRequiredService<IAssetStore>(),
exposeSourceUrl)) exposeSourceUrl))
.As<IGraphQLUrlGenerator>().As<IRuleUrlGenerator>().As<IAssetUrlGenerator>(); .As<IGraphQLUrlGenerator>().As<IRuleUrlGenerator>().As<IAssetUrlGenerator>();

2
src/Squidex/Config/Domain/LoggingServices.cs

@ -10,7 +10,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Domain.Apps.Entities.Apps; using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Infrastructure.Log; using Squidex.Infrastructure.Log;
using Squidex.Pipeline; using Squidex.Web.Pipeline;
namespace Squidex.Config.Domain namespace Squidex.Config.Domain
{ {

3
src/Squidex/Config/Domain/SubscriptionServices.cs

@ -12,6 +12,7 @@ using Squidex.Domain.Apps.Entities.Apps.Services;
using Squidex.Domain.Apps.Entities.Apps.Services.Implementations; using Squidex.Domain.Apps.Entities.Apps.Services.Implementations;
using Squidex.Domain.Users; using Squidex.Domain.Users;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Web;
namespace Squidex.Config.Domain namespace Squidex.Config.Domain
{ {
@ -19,7 +20,7 @@ namespace Squidex.Config.Domain
{ {
public static void AddMySubscriptionServices(this IServiceCollection services, IConfiguration config) public static void AddMySubscriptionServices(this IServiceCollection services, IConfiguration config)
{ {
services.AddSingletonAs(c => c.GetRequiredService<IOptions<MyUsageOptions>>()?.Value?.Plans.OrEmpty()); services.AddSingletonAs(c => c.GetRequiredService<IOptions<UsageOptions>>()?.Value?.Plans.OrEmpty());
services.AddSingletonAs<ConfigAppPlansProvider>() services.AddSingletonAs<ConfigAppPlansProvider>()
.AsOptional<IAppPlansProvider>(); .AsOptional<IAppPlansProvider>();

1
src/Squidex/Config/Orleans/OrleansServices.cs

@ -15,6 +15,7 @@ using OrleansDashboard;
using Squidex.Domain.Apps.Entities; using Squidex.Domain.Apps.Entities;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Orleans; using Squidex.Infrastructure.Orleans;
using Squidex.Web;
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment; using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
namespace Squidex.Config.Orleans namespace Squidex.Config.Orleans

2
src/Squidex/Config/Web/WebExtensions.cs

@ -17,8 +17,8 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Net.Http.Headers; using Microsoft.Net.Http.Headers;
using Squidex.Infrastructure.Json; using Squidex.Infrastructure.Json;
using Squidex.Pipeline;
using Squidex.Pipeline.Robots; using Squidex.Pipeline.Robots;
using Squidex.Web.Pipeline;
namespace Squidex.Config.Web namespace Squidex.Config.Web
{ {

3
src/Squidex/Config/Web/WebServices.cs

@ -9,9 +9,10 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Squidex.Config.Domain; using Squidex.Config.Domain;
using Squidex.Pipeline;
using Squidex.Pipeline.Plugins; using Squidex.Pipeline.Plugins;
using Squidex.Pipeline.Robots; using Squidex.Pipeline.Robots;
using Squidex.Web;
using Squidex.Web.Pipeline;
namespace Squidex.Config.Web namespace Squidex.Config.Web
{ {

4
src/Squidex/Pipeline/Swagger/NSwagHelper.cs

@ -14,7 +14,7 @@ using Microsoft.AspNetCore.Http;
using NJsonSchema; using NJsonSchema;
using NJsonSchema.Generation; using NJsonSchema.Generation;
using NSwag; using NSwag;
using Squidex.Config; using Squidex.Web;
namespace Squidex.Pipeline.Swagger namespace Squidex.Pipeline.Swagger
{ {
@ -33,7 +33,7 @@ namespace Squidex.Pipeline.Swagger
} }
} }
public static SwaggerDocument CreateApiDocument(HttpContext context, MyUrlsOptions urlOptions, string appName) public static SwaggerDocument CreateApiDocument(HttpContext context, UrlsOptions urlOptions, string appName)
{ {
var scheme = var scheme =
string.Equals(context.Request.Scheme, "http", StringComparison.OrdinalIgnoreCase) ? string.Equals(context.Request.Scheme, "http", StringComparison.OrdinalIgnoreCase) ?

1
src/Squidex/Squidex.csproj

@ -38,6 +38,7 @@
<ProjectReference Include="..\Squidex.Infrastructure.MongoDb\Squidex.Infrastructure.MongoDb.csproj" /> <ProjectReference Include="..\Squidex.Infrastructure.MongoDb\Squidex.Infrastructure.MongoDb.csproj" />
<ProjectReference Include="..\Squidex.Infrastructure.Redis\Squidex.Infrastructure.Redis.csproj" /> <ProjectReference Include="..\Squidex.Infrastructure.Redis\Squidex.Infrastructure.Redis.csproj" />
<ProjectReference Include="..\Squidex.Shared\Squidex.Shared.csproj" /> <ProjectReference Include="..\Squidex.Shared\Squidex.Shared.csproj" />
<ProjectReference Include="..\Squidex.Web\Squidex.Web.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

11
src/Squidex/WebStartup.cs

@ -14,6 +14,7 @@ using Squidex.Areas.Api;
using Squidex.Areas.Api.Config.Swagger; using Squidex.Areas.Api.Config.Swagger;
using Squidex.Areas.Api.Controllers.Contents; using Squidex.Areas.Api.Controllers.Contents;
using Squidex.Areas.Api.Controllers.News; using Squidex.Areas.Api.Controllers.News;
using Squidex.Areas.Api.Controllers.UI;
using Squidex.Areas.Frontend; using Squidex.Areas.Frontend;
using Squidex.Areas.IdentityServer; using Squidex.Areas.IdentityServer;
using Squidex.Areas.IdentityServer.Config; using Squidex.Areas.IdentityServer.Config;
@ -30,9 +31,9 @@ using Squidex.Domain.Apps.Entities.Contents;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Diagnostics; using Squidex.Infrastructure.Diagnostics;
using Squidex.Infrastructure.Translations; using Squidex.Infrastructure.Translations;
using Squidex.Pipeline;
using Squidex.Pipeline.Plugins; using Squidex.Pipeline.Plugins;
using Squidex.Pipeline.Robots; using Squidex.Pipeline.Robots;
using Squidex.Web;
namespace Squidex namespace Squidex
{ {
@ -86,17 +87,17 @@ namespace Squidex
config.GetSection("healthz:gc")); config.GetSection("healthz:gc"));
services.Configure<ETagOptions>( services.Configure<ETagOptions>(
config.GetSection("etags")); config.GetSection("etags"));
services.Configure<UrlsOptions>(
config.GetSection("urls"));
services.Configure<UsageOptions>(
config.GetSection("usage"));
services.Configure<MyContentsControllerOptions>( services.Configure<MyContentsControllerOptions>(
config.GetSection("contentsController")); config.GetSection("contentsController"));
services.Configure<MyUrlsOptions>(
config.GetSection("urls"));
services.Configure<MyIdentityOptions>( services.Configure<MyIdentityOptions>(
config.GetSection("identity")); config.GetSection("identity"));
services.Configure<MyUIOptions>( services.Configure<MyUIOptions>(
config.GetSection("ui")); config.GetSection("ui"));
services.Configure<MyUsageOptions>(
config.GetSection("usage"));
services.Configure<MyNewsOptions>( services.Configure<MyNewsOptions>(
config.GetSection("news")); config.GetSection("news"));

2
tests/Squidex.Tests/Pipeline/CommandMiddlewares/ETagCommandMiddlewareTests.cs → tests/Squidex.Web.Tests/CommandMiddlewares/ETagCommandMiddlewareTests.cs

@ -14,7 +14,7 @@ using Squidex.Domain.Apps.Entities.Contents.Commands;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Xunit; using Xunit;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public class ETagCommandMiddlewareTests public class ETagCommandMiddlewareTests
{ {

2
tests/Squidex.Tests/Pipeline/CommandMiddlewares/EnrichWithActorCommandMiddlewareTests.cs → tests/Squidex.Web.Tests/CommandMiddlewares/EnrichWithActorCommandMiddlewareTests.cs

@ -16,7 +16,7 @@ using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Security; using Squidex.Infrastructure.Security;
using Xunit; using Xunit;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public class EnrichWithActorCommandMiddlewareTests public class EnrichWithActorCommandMiddlewareTests
{ {

3
tests/Squidex.Tests/Pipeline/CommandMiddlewares/EnrichWithAppIdCommandMiddlewareTests.cs → tests/Squidex.Web.Tests/CommandMiddlewares/EnrichWithAppIdCommandMiddlewareTests.cs

@ -14,9 +14,10 @@ using Squidex.Domain.Apps.Entities.Apps.Commands;
using Squidex.Domain.Apps.Entities.Contents.Commands; using Squidex.Domain.Apps.Entities.Contents.Commands;
using Squidex.Infrastructure; using Squidex.Infrastructure;
using Squidex.Infrastructure.Commands; using Squidex.Infrastructure.Commands;
using Squidex.Web.Pipeline;
using Xunit; using Xunit;
namespace Squidex.Pipeline.CommandMiddlewares namespace Squidex.Web.CommandMiddlewares
{ {
public class EnrichWithAppIdCommandMiddlewareTests public class EnrichWithAppIdCommandMiddlewareTests
{ {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save