Commit Graph

573 Commits

Author SHA1 Message Date
Bjarke Berg
6e41a3123d Merge remote-tracking branch 'origin/release/12.0' into v12/dev 2023-06-21 08:37:43 +02:00
Kenn Jacobsen
0cdea6120b Add support for property value fallbacks in the delivery API (#14421)
* Add support for property value fallbacks in the delivery API

* Add dedicated tests for the IDeliveryApiPropertyValueConverter interface

* Rewrite for less impact and more streamlined with Razor output
2023-06-21 08:32:57 +02:00
Bjarke Berg
197efbb12c Merge remote-tracking branch 'origin/release/12.0' into v12/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs
#	version.json
2023-06-20 13:56:27 +02:00
Bjarke Berg
54479c9538 Updated nuget packages to latest versions (#14419) 2023-06-20 12:21:16 +02:00
Mole
446544c045 V12: Add deliver api information to detailed telemetry (#14418)
* Add deliver api information to detailed telemetry

* Update translation
2023-06-20 12:03:46 +02:00
Ronald Barendse
c989c5e214 Support publishing multiple notifications, filter on handler type and add IDistributedCacheNotificationHandler<TNotification> (optimizes cache refreshers) (#14332)
* Clean up DistributedCache and add additional checks

* Add IEnumerable overloads to DistributedCacheExtensions

* Update handlers to use new IEnumerable overloads

* Move DistributedCacheExtensions to Core

* Restructure cache refreshers into folders

* Add IDistributedCacheNotificationHandler

* Rewrite DistributedCacheBinder into seperate IDistributedCacheNotificationHandler implementations

* Obsolete DistributedCacheBinder and use new IDistributedCacheHandler implementations

* Clean up ServerMessengerBase

* Ensure cache refreshers only process distinct values

* Add support for publishing multiple notifications and filter on handler type

* Suppress compatibility issues

* Remove DistributedCacheBinder and suppress compatibility issues

* Add ScopedNotificationPublisher<TNotificationHandler>

* Improve notification type lookup/enumeration

* Ensure INotificationAsyncHandler handles multiple notitications sequentially

* Minimize cache instruction JSON

* Chunk notifications by type to keep publish order

* Only serialize required RefreshInstruction properties
2023-06-20 11:15:47 +02:00
Mole
45fd5d218b Use ComputeHMACAsync instead of ComputeHMAC in URL generator (#14364) 2023-06-09 09:20:07 +02:00
Nikolaj Geisle
8b7094c8cf V12: use database when testing examine (#14360)
* Use databases for examine tests

* Use same schema for entire fixture

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-06-08 12:05:10 +02:00
Sebastiaan Janssen
8447350915 Merge branch 'v12/dev' into contrib 2023-06-08 10:24:39 +02:00
Bjarke Berg
96dc594269 Merge remote-tracking branch 'origin/v11/dev' into release/12.0
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-06-08 08:37:30 +02:00
nikolajlauridsen
537e078d43 Merge branch 'release/12.0' into v12/dev 2023-06-06 13:52:17 +02:00
nikolajlauridsen
a6bb637fab Add scopes to tests 2023-06-06 12:24:29 +02:00
Kenn Jacobsen
809883f088 Support entirely unpublished content in preview mode (#14307)
* Support draft-only content in the Delivery API query

* Allow outputting "entirely unpublished" content

* Make the preview path explicit to avoid clashing endpoints

* Handle trailing slash setting for preview URLs

* Update src/Umbraco.Infrastructure/Examine/DeliveryApiContentIndexValueSetBuilder.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Remove superfluous (and incorrect) unpublished route handling

* Make sure preview output includes routes for unpublished cultures

* Ensure that published content with unpublished ancestors are available in preview

* Fix route start item when previewing published content with unpublished parent

---------

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-06-05 12:00:25 +02:00
Ahmet
cf6a7a3bc0 Fix #14270 - ImageCropperValue.GetCropUrl(alias, imageUrlGenerator) always returns null (#14308) 2023-05-31 13:47:09 +02:00
Ronald Barendse
41e51d6e71 Add PackageId to package manifest and PackageMigrationPlan (#14047)
* Add VersionAssemblyName to package manifest

* Fix/improve nullability

* Ensure package version from manifest is set when package migration exists

* Set versionAssemblyName in umbracopackage template

* Use Assembly.Load instead of ITypeFinder

* Use AssemblyLoadContext to get asesmbly by name

* Add PackageId to package manifest

* Show ID on installed packages overview

* Fallback to package ID to get assembly version

* Include package ID in telemetry data

* Set id in umbracopackage template

* Add PackageId to PackageMigrationPlan

* Get version from package migration assembly

* Hide unknown package version

* Always use package name from manifest

* Use IPackagingService to return package telemety data

* Set versionAssemblyName in umbracopackage-rcl template

* Set id in umbracopackage-rcl template
2023-05-31 11:31:37 +02:00
Bjarke Berg
82746518d4 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-05-31 09:11:24 +02:00
Bjarke Berg
2407d42de6 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Constants-Telemetry.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Telemetry/TelemetryServiceTests.cs
2023-05-31 08:48:28 +02:00
Kenn Jacobsen
3b433e6658 Expose "expanding" state in API value conversion (#14312)
* Expose "expanding" state in API value conversion

* Add unit test

* Add non-breaking and obsoletion

* Add compat suppressions
2023-05-31 08:46:30 +02:00
Nikolaj
c6d94b3fd4 Merge remote-tracking branch 'origin/release/11.4' into v11/dev 2023-05-25 12:59:24 +02:00
Jacob Overgaard
7f798bcc91 v12: add support for Node.js 18 (#14259)
* add .nvmrc to instruct NVM of preferred version

* update azure-pipelines.yml with node 18.16

* update "engines" section of package.json with preferred node.js 18.16

* update lockfiles in accordance with node 18 (lockfileVersion: 3)
2023-05-25 11:19:03 +02:00
Jacob Overgaard
6791a99872 v12: add support for Node.js 18 (#14259)
* add .nvmrc to instruct NVM of preferred version

* update azure-pipelines.yml with node 18.16

* update "engines" section of package.json with preferred node.js 18.16

* update lockfiles in accordance with node 18 (lockfileVersion: 3)
2023-05-25 11:18:29 +02:00
Nikolaj
e52e98741e Fix integration tests 2023-05-25 08:54:38 +02:00
Nikolaj Geisle
6bcec26db3 V10: Implement varying blocklist indexing (#14287)
* Implement available culture in Interface and base classes

* Add available cultures

* DI localizationService and use it

* Make the new method have default implementation to avoid breaking change

* Create implementations for old method

* Pass available cultures

* Pass localization service

* Create new method that takes available cultures

* Add ILocalizationService to DI

* implement missing method

* Add database for schema test

* Fixed issue with indexes not added correctly to nested types..

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-25 08:40:10 +02:00
Nikolaj Geisle
b37bb517ab V10: Implement varying blocklist indexing (#14287)
* Implement available culture in Interface and base classes

* Add available cultures

* DI localizationService and use it

* Make the new method have default implementation to avoid breaking change

* Create implementations for old method

* Pass available cultures

* Pass localization service

* Create new method that takes available cultures

* Add ILocalizationService to DI

* implement missing method

* Add database for schema test

* Fixed issue with indexes not added correctly to nested types..

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-25 08:36:42 +02:00
Mole
999a83995e V10: Add external login provider count to detailed telemetry (#14282)
* Add backoffice external login provider count to telemetry

* Update translation

* Fix integration test
2023-05-24 11:48:56 +02:00
Kenn Jacobsen
3cadd35d40 Start-item support in RTE markup (#14283)
* Append start item to RTE markup

* Split the Examine specifics from API query service (#14257)

* Split the Examine specifics from API query service to a provider based model

* Review changes: Use paged model as provider return value + add logging

* Fix version

* Revert incidentally changed version number by targeting wrong branch

* Fix wrongly changed version number --- it's RC2 now

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-24 08:02:42 +02:00
Sebastiaan Janssen
bd7de1c89b Merge branch 'v12/dev' into contrib 2023-05-19 10:47:27 +02:00
Bjarke Berg
a4202f352a Ignore macros completely in deliveryapi (#14262)
* Hack a fix for MNTP that saves content in configuration instead of document

* Ignore macro parsing in delivery api, instead of exploding
2023-05-17 11:03:27 +02:00
Lucas Bach Bisgaard
9f028e0bd5 Add posibillty to use composition on memberstype (#14060) 2023-05-15 15:51:14 +02:00
Kenn Jacobsen
b32b8c2265 Un-routable content should never be accessible in the delivery API (#14242) 2023-05-15 10:27:20 +02:00
Kenn Jacobsen
85d46c3e82 Merge local and global crops for MediaPicker3 (#14237) 2023-05-15 10:06:24 +02:00
Andreas Zerbst
401fa7334b Fixed: an block grid editor accceptance test on the pipeline for v12 (#14240)
* The attribute we asserted on has been changed which failed our test. The test is updated to match with the correct url

* Updated so we use encodeURI instead of replacing the values in the path
2023-05-15 08:04:16 +02:00
Bjarke Berg
d48a8d7c75 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/ViewModels/Installer/InstallViewModel.cs
2023-05-15 07:57:45 +02:00
Nikolaj Geisle
487e85cacd Entity Framework Core Support (#14109)
* Add UmbracoEFCore project

* Add EFCore composer

* Add Locking Mechanisms

* Add scope interfaces

* Add excecute scalar extension method

* fix up query in locking mechanism

* Add scoping

* Add scoping

* Add test DbContext classes

* add locking test of EFCore

* Creat ScopedFileSystemsTests

* Add EFCoreScopeInfrastructureScopeLockTests

* Add EFCoreScopeInfrastructureScopeTests

* Add EFCoreScopeNotificationsTest.cs

* Add EFCoreScopeTest.cs

* Remake AddUmbracoEFCoreContext to use connection string

* Remove unused code from extension method

* Reference EFCore reference to Cms.csproj

* Remove unused parameter

* Dont have default implementation, breaking change instead

* Add compatability suppression file

* Updated EFCore packages

* Use timespan for timeout

* Allow overriding default EF Core actions

* Option lifetime needs to be singleton

* Use given timeout in database call

* dont use timespan.zero, use null instead

* Use variable timeout

* Update test to use locking mechanism

* Remove unneccesary duplicate code

* Change to catch proper exception number

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-12 09:25:19 +02:00
Andreas Zerbst
36fe2f7e49 V12: Remove test.only for acceptance tests (#14232)
* Remove test.only

* Try quick fix for test

* Fixed failing test so it now locates the correct class. Updated the locators aswell

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-05-11 15:02:52 +02:00
Nikolaj Geisle
36d72ac85c Fallback to detailed if not telemetry level not set (#14134)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-05-11 13:50:47 +02:00
Nikolaj Geisle
02669e930c V12: Update dependencies to latest (#14204)
* Update dependencies to latest

* revert npoco back to 5.5.0

* Updated Npoco and Serilog

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-05-11 13:32:14 +02:00
Ronald Barendse
27ae8bdba9 v12: Add HMAC image processing protection (#14181)
* Update to ImageSharp 2.1.0 and ImageSharp.Web 2.0.0-alpha.0.23

* Rename CachedNameLength to CacheHashLength and add CacheFolderDepth setting

* Replace PhysicalFileSystemProvider with WebRootImageProvider

* Support EXIF-orientation in image dimention extractor

* Remove virtual methods on FileProviderImageProvider

* Simplify FileInfoImageResolver

* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.25 and remove custom providers

* Make CropWebProcessor EXIF orientation-aware

* Improve width/height sanitization

* Also use 'v' as cache buster value

* Add WebP to supported image file types

* Update to SixLabors.ImageSharp.Web 2.0.0-alpha.0.27 and fix test

* Fix rounding error and add test cases

* Update to newest and stable releases

* Move ImageSharpImageUrlGenerator to Umbraco.Web.Common

* Use IConfigureOptions to configure ImageSharp options

* Implement IEquatable on ImageUrlGenerationOptions classes

* Fix empty/null values in image URL generation and corresponding tests

* Use IsSupportedImageFormat extension method

* Remove unneeded reflection

* Add HMACSecretKey setting and add token when generating image URLs

* Ensure backoffice image URLs are generated by the server (and include a correct HMAC token)

* Abstract HMAC generation to IImageUrlTokenGenerator

* Change cache buster value to 'v' and use hexadecimal timestamp

* Update comments

* Fix backoffice thumbnail URL generation

* Update grid media thumbnail URL generation

* Remove breaking changes

* Strip unknown commands from image URL token

* Remove HMAC whitelisting possibility (not supported by ImageSharp)

* Update to SixLabors.ImageSharp 2.1.3

* Add comment to internal constructor

* Fix to support absolute image URLs

* Update to SixLabors.ImageSharp.Web 2.0.3-alpha.0.3

* Remove IImageUrlTokenGenerator and use ImageSharpRequestAuthorizationUtilities

* Move NuGet feed to config file

* Update to ImageSharp v3
2023-05-11 11:01:03 +02:00
Nikolaj Geisle
b0b591821b V11: prevent currentuser resetting password without old password (#14189)
* Implement check for current user if no old password

* Add default implementation to avoid breaking change9
2023-05-10 14:55:06 +02:00
Kenn Jacobsen
2f7cb83462 IAppCache implementations should not cache null values (#14218)
* IAppCache implementations should not cache null values

* Add comment
2023-05-10 14:23:02 +02:00
Kenn Jacobsen
b0f42a2c86 Move the built-in properties back to the delivery API media model + support property expansion for other media properties (#14224)
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-10 14:04:42 +02:00
Kenn Jacobsen
e3e6582715 Always use text elements in RTE JSON output (#14220)
* Always wrap text in #text elements for RTE JSON output

* Small cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-05-10 08:47:23 +02:00
Nathan Woulfe
6f3cf6ead5 Migration needs to check for completed transitions before accessing (#14174)
* check for completed transitions before accessing target state

* upgrader should be happy with initial and final state being the same value - only an empty final state should throw

* refactor

* reduce complexity

* Don't check for successfull

* Add test that runs migration twice

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-05-09 12:26:41 +02:00
Bjarke Berg
aee358330d Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/Controllers/ModelsBuilder/BuildModelsBuilderController.cs
#	src/Umbraco.Cms.ManagementApi/DependencyInjection/MappingBuilderExtensions.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
2023-05-08 16:57:26 +02:00
Bjarke Berg
0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00
Nikolaj
21c6828b59 Use regex for class 2023-05-04 09:32:32 +02:00
Nikolaj
f7f361239c Try quick fix for test 2023-05-04 09:32:27 +02:00
Nikolaj
05908e2c78 Remove test.only 2023-05-04 09:32:18 +02:00
Nikolaj
842f1f886f Use regex for class 2023-05-03 13:15:17 +02:00
Nikolaj
a744cd465a Try quick fix for test 2023-05-03 13:13:39 +02:00