Commit Graph

51 Commits

Author SHA1 Message Date
Chad
e784cfa960 Improve logging performance by checking Trace/Debug log level is enabled (#12793) 2023-06-07 11:47:05 +02:00
Mole
2538f946fc Check explicitly for MaintenanceResult in published request filter (#13911)
LGTM 💪
2023-03-07 08:15:19 +01:00
Bjarke Berg
884793f729 Added fix to maintenance page so it is shown before the content cache is created. (#13767) 2023-02-05 16:47:09 +01:00
Bjarke Berg
2d564a11b9 Maintenance page when in upgrade state (#13551)
* Added functionality to show maintenance page and fixed issues with showing custom api controllers and 404 page, when umbraco had been in install or upgrade state

* Fixed Tests

* Fixed typo

* Fixed issue with login screen redirecting to website when in upgrade state, instead of backoffice
2022-12-14 08:14:19 +01:00
Mole
8ffede0441 V10: merge release branch 20220620 (#12590)
* Add Umbraco specific global usings

* Enable implicit usings

* v10: Wait for updated ConnectionStrings during install (#12536)

* Do not change/reload configuration

* Wait for updated connection string options

* recase assigndomain (#12448)

* Add depth property to ICoreScope (#12540)

* Remove ambient scope stack from httpcontext.items. (#12539)

This change makes it easier to use service calls in parallel whilst
a httpcontext is available.

* v10: Prefer SQLite primitive types to flexible types (#12541)

* Prefer SQLite primitive types to flexible types.

* SQLite - column mappings use TEXT for decimals

Thanks @mattbrailsford for sense check.

* Fix issue where languages files are not found in subdir of package dir (#12543)

* Make FindContent return type nullable (#12545)

* Updated nuget dependencies (07-06-2022) (#12525)

* Updated nuget dependencies

* Move Nerdbank.GitVersioning update to Directory.Build.props

* Updated more dependencies

* Improve FlagOutOfDateModels property behaviour.

(cherry picked from commit 54077725c373495fce0d3fbc5cdb6469aad3b676)

* Fix logic error WRT models builder flag out of date models. (#12548)

(cherry picked from commit 6b0149803a879d1c6902a5f61d1f2e9dc8545aac)

* Fixed issue with expected null value. (#12550)

Fixes https://github.com/umbraco/Umbraco-CMS/issues/12526

* Updated Examine to 3.0.0

* Fixes relation issue, when moving a root item to recycle bin, the "Relate Parent Media Folder On Delete"/"Relate Parent Document On Delete" cannot get the parent node type, because it is a fake root.

* Fix possible null error

* Bump version to 10.0.0 final

* Fix attempting to write lock files to LocalTempPath before it exists (#12563)

* Re fix usage statements

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Paul Johnson <pmj@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-06-20 09:20:47 +02:00
Nikolaj Geisle
c576bbea03 v10: Fix build warnings in Web.Common (#12349)
* Run code cleanup

* Run dotnet format

* Start manual cleanup in Web.Common

* Finish up manual cleanup

* Fix tests

* Fix up InMemoryModelFactory.cs

* Inject proper macroRenderer

* Update src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Web.Common/Filters/ValidateUmbracoFormRouteStringAttribute.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fix based on review

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-05-09 09:39:46 +02:00
Nikolaj Geisle
b52c4e50cf Add nullability to web.common 2022-03-29 13:44:21 +02:00
Elitsa Marinovska
1b5830a9d7 V9: Visiting a page without a template returns "Page Not Found" (#11852)
* Returns "Page Not Found" when template doesn't exist for a docType

* Fix comment

* Use IsNullOrWhiteSpace instead of IsNullOrEmpty

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-01-18 15:36:25 +01:00
Zeegaan
285c9c92b5 Fixed duplications 2021-08-17 11:41:28 +02:00
Zeegaan
c3bac00f6e Fixed 11 more classes with new TryGetUmbracoContext 2021-08-11 12:17:35 +02:00
Shannon
bc84ffe260 Changes all collections from collection builders to resolve the concrete instances lazily.
This means we don't have to inject Lazy<T> all over the place when dealing with
colleciton builders and circular references since this will automatically just work OOTB.
This in theory should also allocate less instances during startup.
2021-07-12 15:28:46 -06:00
Mole
f8d357f992 Add UmbracoAuthorizedController 2021-07-01 15:52:09 +02:00
Shannon Deminick
a1624d26a3 Implements Public Access in netcore (#10137)
* Getting new netcore PublicAccessChecker in place

* Adds full test coverage for PublicAccessChecker

* remove PublicAccessComposer

* adjust namespaces, ensure RoleManager works, separate public access controller, reduce content controller

* Implements the required methods on IMemberManager, removes old migrated code

* Updates routing to be able to re-route, Fixes middleware ordering ensuring endpoints are last, refactors pipeline options, adds public access middleware, ensures public access follows all hops

* adds note

* adds note

* Cleans up ext methods, ensures that members identity is added on both front-end and back ends. updates how UmbracoApplicationBuilder works in that it explicitly starts endpoints at the time of calling.

* Changes name to IUmbracoEndpointBuilder

* adds note

* Fixing tests, fixing error describers so there's 2x one for back office, one for members, fixes TryConvertTo, fixes login redirect

* fixing build

* Fixes keepalive, fixes PublicAccessMiddleware to not throw, updates startup code to be more clear and removes magic that registers middleware.

* adds note

* removes unused filter, fixes build

* fixes WebPath and tests

* Looks up entities in one query

* remove usings

* Fix test, remove stylesheet

* Set status code before we write to response to avoid error

* Ensures that users and members are validated when logging in. Shares more code between users and members.

* Fixes RepositoryCacheKeys to ensure the keys are normalized

* oops didn't mean to commit this

* Fix casing issues with caching, stop boxing value types for all cache operations, stop re-creating string keys in DefaultRepositoryCachePolicy

* bah, far out this keeps getting recommitted. sorry

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-04-20 07:11:45 +02:00
Bjarke Berg
bfb78e937f Netcore: Update code docs generation (#9885)
* Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline

* updated script that generate docs to use .NET 5

* Increased timeout of docs generation + changed to 5.x instead of 5.0.x

Fixed wrong namespace, that would be we not have docs for it.

* Fixed names in toc, so they are not that long and changed ordering

* try custom hack https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535

* revert nonworking hack - Divide prep steps into two.

* Changed ordering

* Try to generate docs without the build.ps1 script

* Try to generate docs without the build.ps1 script

* Try to generate docs without the build.ps1 script

* Try to remove the examine one, to test if that is the reason it fails on azure pipeline

* Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline

* Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline.

* Test if azure wanna build the docs without explicit version

* Fixed two malformed xml docs

* hardcode version of docfx, to hopefully let it pass on azure pipeline

* hardcode version of docfx, to hopefully let it pass on azure pipeline

* Restructure azure pipeline yaml to have stages as areas instead of OS

* Restructure azure pipeline yaml to have stages as areas instead of OS

* yml restructure

* yml restructure

* yml restructure

* Not hardcoding docfx as the old versions also fail on azure

* Fixed Badly formed XML comments

* moved condition from job to stage

* split build and metadata

* indentation

* removed wrong char

* Try to add more loging on azure pipeline

* include less

* include less projects

* add one more project

* More azure pipeline test

* indentation

* All except infrastructure

* publish tasks

* Fix link on logo

* Extensions also included

* Less links

* re-introduced infrastructure to the list of projects for generate docfx for.

* Add filter

* Remove single warning for xmldocs

* more logging?

* skip some things from the metadata

* test using other image

* Test if exclude filter works

* Test with more explict filters, allowing some docs from Infrastructure

* binary search for the file that is the issue

* binary search for the file that is the issue

* binary search for the file that is the issue

* Exclude more folders

* Exclude more folders and files

* Only exclude files in root of namespace?

* more filter trials

* more filter trials

* add 2 nested folders

* all cs files?

* Remove test projects

* Toc

* Update build/azure-pipelines.yml

* move display name element

* Update build/azure-pipelines.yml

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2021-03-18 14:48:22 +01:00
Shannon
abb5911b24 WIP fixing issue with macro forms 2021-02-26 16:53:53 +11:00
Mole
ce5eaac5a4 Merge branch 'netcore/feature/align-namespaces' into netcore/feature/align-infrastructure-namespaces
# Conflicts:
#	src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
#	src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs
2021-02-17 15:44:36 +01:00
Mole
57f7a8432c Fix Merge 2021-02-17 15:41:54 +01:00
Mole
738150f5ad Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/align-namespaces
# Conflicts:
#	src/Umbraco.Core/IO/ViewHelper.cs
#	src/Umbraco.Core/Models/ContentModel.cs
#	src/Umbraco.Core/Models/ContentModelOfTContent.cs
#	src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TemplateRepositoryTest.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Core/Templates/ViewHelperTests.cs
#	src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Views/UmbracoViewPageTests.cs
#	src/Umbraco.Web.Common/ApplicationModels/BackOfficeApplicationModelProvider.cs
#	src/Umbraco.Web.Common/ApplicationModels/BackOfficeIdentityCultureConvention.cs
#	src/Umbraco.Web.Common/ApplicationModels/UmbracoApiBehaviorApplicationModelProvider.cs
#	src/Umbraco.Web.Common/ApplicationModels/UmbracoJsonModelBinderConvention.cs
#	src/Umbraco.Web.Common/Controllers/RenderController.cs
#	src/Umbraco.Web.Common/Macros/PartialViewMacroPage.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
#	src/Umbraco.Web.UI.NetCore/Views/Partials/blocklist/default.cshtml
#	src/Umbraco.Web.UI.NetCore/Views/Partials/grid/bootstrap3-fluid.cshtml
#	src/Umbraco.Web.UI.NetCore/Views/Partials/grid/bootstrap3.cshtml
#	src/Umbraco.Web.UI.NetCore/Views/Partials/grid/editors/embed.cshtml
#	src/Umbraco.Web.UI.NetCore/Views/Partials/grid/editors/macro.cshtml
#	src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs
#	src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs
2021-02-17 15:35:44 +01:00
Bjarke Berg
2ba3eb436c Fixed up small findings in refiew..
- Uses ILogger<T> instead of ILoggerFactory
- Uses the GetControllerName extension
- Fixes views
2021-02-17 12:00:57 +01:00
Shannon
9ef8de36e5 Ensures that we don't add duplicate UmbracoVirtualPageFilterAttribute and that we use the ActionExecutingContext as the context during the FindContent operation 2021-02-16 18:02:05 +11:00
Shannon
4f2682678e Gets virtual page routing working, now just need to document. 2021-02-15 18:50:16 +11:00
Mole
5bd8e32279 Align namespaces in Persistence
Made everything except for repository interface be in the Umbraco.Cms.Infrastructure.Persistence namespace
2021-02-12 13:36:50 +01:00
Mole
55aa2edb72 Align namespaces in Umbraco.Web.Common 2021-02-10 11:42:04 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Shannon
6273c95a90 Gets UmbracoPageResult working with ViewData and TempData 2021-02-04 14:51:55 +11:00
Shannon
0c26a82489 Changes the umbraco route values to use http features intead of in route values which is much nicer, fixes the redirect to page result, tests a surface controller POST and it works, ensures the routing takes place before the form check, removes a bunch of old code 2021-02-03 15:47:27 +11:00
Shannon
c024db9d3c gets surface controllers and front-end api controllers auto-routed, adds tests 2021-02-02 14:48:01 +11:00
Elitsa Marinovska
ccfb915584 Getting rid of HttpResponseExceptionFilter 2021-01-13 16:08:00 +01:00
Shannon
c15b416e88 Ensures the culture is set for requests for both front-end and back office 2021-01-08 11:29:07 +11:00
Shannon
b017ed0b1b Gets the UpdateRequestToNotFound thing working 2021-01-08 02:36:55 +11:00
Shannon
bc6768101e Splits up UmbracoRouteValueTransformer and trying to figure out this hijacked route conundrum with no template :( 2021-01-08 02:10:13 +11:00
Shannon
53bc92608a rename property 2021-01-08 00:33:47 +11:00
Shannon
333479666c removes ResponseStatusDescription and others that aren't used, ports the not found handler, ports redirects, headers, etc... 2021-01-06 20:03:49 +11:00
Shannon
b1045e081b Makes ModelBindingExceptionAttribute 2020-12-22 10:52:25 +11:00
Shannon
63ab8ec52c Lots of notes, removes data tokens, 2020-12-10 18:09:32 +11:00
Shannon
e3be4009c0 Getting front end routing poc going 2020-12-08 16:33:50 +11:00
Shannon
8e15e265fd Adds TODOs, puts back UmbracoRequireHttpsAttribute but in a nicer way, ensures test classes initialize the authz policies with the test scheme 2020-11-26 16:52:03 +11:00
Shannon
e0665973e3 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/6666-auth-policies
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/CoreInitialComposer.cs
#	src/Umbraco.Web.BackOffice/Extensions/BackOfficeServiceCollectionExtensions.cs
#	src/Umbraco.Web.Common/Filters/UmbracoBackOfficeAuthorizeFilter.cs
#	src/Umbraco.Web.Common/Runtime/AspNetCoreComposer.cs
2020-11-25 11:55:16 +11:00
Bjarke Berg
84237d4a57 Remove Security from UmbracoContext (#9392)
* Remove Security from UmbracoContext

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Removing files reference from csproj

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2020-11-24 12:52:48 +01:00
Shannon
e7b4c5a811 Converts FeatureAuthorize to authz policy 2020-11-20 12:40:29 +11:00
Paul Johnson
3f5f85880e NetCore: MSDI refactor split CoreRuntime & Remove Current (#9356)
* Split Bootstrap code from CoreRuntime

* Make ContentService method signatures match interface
prevents need to hide the concrete class in tests

* Remove Current

Only bit that bugs me is TreeNode for IconFilePath
I get the feeling it's dead code, but can just use a setter in cs or work out path in js if required.

* Fix tests, remember to terminate IRuntime
2020-11-10 09:50:47 +01:00
Bjarke Berg
b27732adc8 Migrated RenderMvcController and RenderIndexActionSelectorAttribute
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-15 11:42:16 +02:00
Mole
581775e08c Remove public ILogger from PluginController
Having a public ILogger doesn't align with MS ILogger, and the logger is never used
2020-09-21 11:46:29 +02:00
Andy Butland
1cf4374a48 Updated various type filters to attributes with nested filters. 2020-06-13 11:08:59 +02:00
Shannon
e3591923c3 Gets auto-routing back office api controllers working, lots of notes 2020-05-14 17:04:16 +10:00
Shannon
39fed867c1 Cleans up some routing, mvc base classes, gets controller specific model binding working, applies our own application model to our controllers 2020-05-12 10:21:40 +10:00
Bjarke Berg
e4dfdbb504 AB#6233 - renamed extensions namespace to Umbraco.Extensions 2020-05-07 10:08:23 +02:00
Bjarke Berg
fa3f52c6d3 AB#6233 - Clean up 2020-05-07 10:00:18 +02:00
Bjarke Berg
f79526e46a Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB6233-install-steps-in-dotnet-core
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/CoreInitialComposer.cs
#	src/Umbraco.Web.Common/Runtime/AspNetCoreComposer.cs
2020-04-24 08:23:55 +02:00
Bjarke Berg
79e9235338 AB#6233 - Install in .NET Core 2020-04-22 08:17:45 +02:00