Commit Graph

453 Commits

Author SHA1 Message Date
Bjarke Berg
9eb36c0234 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_0_0/AddMemberPropertiesAsColumns.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_2_0/AddHasAccessToAllLanguagesColumn.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_2_0/AddUserGroup2LanguageTable.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_3_0/AddBlockGridPartialViews.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_4_0/AddBlockGridPartialViews.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_5_0/AddPrimaryKeyConstrainToContentVersionCleanupDtos.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_7_0/MigrateTagsFromNVarcharToNText.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_11_3_0/AddDomainSortOrder.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_11_4_0/AlterKeyValueDataType.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/UseNvarcharInsteadOfNText.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_1_0/AddOpenIddict.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_1_0/TablesIndexesImprovement.cs
#	src/Umbraco.Web.UI.Docs/README.md
#	src/Umbraco.Web.UI.Docs/gulpfile.js
2024-02-01 11:24:43 +01:00
Bjarke Berg
49acf8b35c Merge remote-tracking branch 'origin/release/13.1' into v13/dev
# Conflicts:
#	version.json
2024-02-01 11:18:58 +01:00
Ronald Barendse
25139dabe0 Skip cache refresher operations for content blueprints (#15633)
* Skip cache refresher operations for content blueprints

* Fix JsonPayload deserialization error by adding a default constructor and property initializers

* Obsolete JsonPayload constructor and update usages
2024-02-01 10:29:31 +01:00
Mole
008083f096 V14: Migration Cleanup (#15629)
* Remove obsoleted migrations

* Re-add default log queries

* Remove unused PreValueMigratorCollectionBuilder from DI

* Remove unused unit test

* Obsolete unused migrations

* Remove migrations prior to v13 from UmbracoPlan

* Fix whitespace

* Use array instead of IEnumerable

* Remove unused migrations
2024-01-31 12:45:56 +01:00
Kenn Jacobsen
aaf7075313 Property level validation for Management API (#15644)
* Property level validation for content - initial implementation

* Always succeed create/update regardless of property level validation errors

* Move old complex editor validation classes to Web.BackOffice so they will be deleted

* Include operation status and property validation errors in ProblemDetails

* Refactor property validation to its own service(s)

* Make the problem details builder a little more generic towards extensions

* Validation for item and branch publish

* Moved malplaced test

* Get rid of a TODO

* Integration tests for content validation service

* Simplify validation service

* Add missing response types to create and update for document and media

* Remove test that no longer applies

* Use "errors" for model validation errors (property validation errors)

* Split create/update and validation into their own endpoints

* Fix forward merge

* Correct wrong assumption for missing properties

* Remove localization from validation error messages - decreases dependencies, adds a lot of obsolete constructors

* Reuse existing validation service + support custom error messages

* Fix merge errors

* Review comments
2024-01-31 10:40:58 +01:00
Kenn Jacobsen
9b454bec6b Model mapping PoC (#15546)
* First take at new models for improved mapping between client and server

* Add variants to Media

* Re-introduced lost names

* Start breaking apart "Id" reference properties in request models as well

* Refactor to fix OpenAPI spec

* Discard TODO (not relevant)

* Split recycle bin response models

* Delete unused marker interface

* Use reference properties for content and media type handling

* Rework document and media types to be explicit in relations (do not expose "content type", it is an implementation detail)

* Mapping for document and media type copy + move

* Ensure correct response model for Media

* Regenerate OpenAPI JSON after forward merge

* Fix forward merge issues

* Fix forward merge + regenerate OpenApi.json

* Added unit tests for content state helper

* Move "allowed document types" endpoint to document type silo, refactored services and added "allowed media types"

* Regenerate OpenApi.json after forward merge

* Do not include content state for media items

* Review fix
2024-01-30 12:19:05 +01:00
Bjarke Berg
91119308a2 Merge remote-tracking branch 'origin/v14/dev' into v14/dev 2024-01-24 11:12:45 +01:00
Mole
76181a8af4 V14: Migrate JsonConfigManipulator to System.Text.Json (#15609)
* Minor cleanup

* Remove old obsoleted property

* Reimplement save connection string

* Remove old method using newtonsoft

* Implement RemoveConnectionStringAsync

* Implement SaveConfigValue

* Implement SaveDisableRedirectUrlTracking

* Cleanup

* Implement SetGlobalIdAsync

* Fix recursive default implementation

* Split manipulating dom and saving json

Otherwise SaveConnectionStringAsync would write twice.

* Add some documentation strings

* Reduce indentation

* Obsolete non-async methods

* Move JsonConfigManipulator to correct namespace and make it internal
2024-01-24 11:07:18 +01:00
Bjarke Berg
7a6b316f4b Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Web.BackOffice/Security/BackOfficeSignInManager.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueEditorReuseTests.cs
#	version.json
2024-01-24 08:36:55 +01:00
Bjarke Berg
aaca7a5ff4 2FA for users in management API (#15607)
* Added 2FA management endpoints

* Ensure not found do not lead to forbidden results

* Do not inherit the requirement to have access to users, from the current user base class

* Updated OpenApi.json

* Handle 2FA in login scenario (only backend)

* Added the endpoint to use for client to post 2FA code

* Fixed tests and allow injecting the authentication type settings

* fix test build

* Fallback to use Constants.Security.BackOfficeAuthenticationType

* remove unused variable

* Review fixes

* Build fix

* Update src/Umbraco.Cms.Api.Management/Controllers/User/Current/DisableTwoFactorProviderCurrentUserController.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Handle case where 2fa provider is already setup

---------

Co-authored-by: Sven Geusens <geusens@gmail.com>
2024-01-23 18:07:21 +01:00
Bjarke Berg
088f907dcc Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueEditorReuseTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionTests.cs
2024-01-23 13:40:07 +01:00
Ronald Barendse
ce22315520 Backport relation tracking fixes and get references from recursive (nested/block) properties (#15593)
* Include automatic relation type aliases from factory and fix SQL parameter overflow (#15141)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations (#15160)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations

* Always get all automatic relation type aliases

* Do not set relation type alias for unknown entity types

* Get references from recursive (nested/block) properties

(cherry picked from commit 5198e7c52d)
2024-01-19 20:06:41 +01:00
Bjarke Berg
aa6f704353 Merge remote-tracking branch 'origin/v14/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/BackgroundJobs/Jobs/OpenIddictCleanupJob.cs
2024-01-12 13:34:30 +01:00
Ronald Barendse
05921ee6cc Refactor System.Runtime.Caching to Microsoft.Extensions.Caching.Memory 2024-01-11 14:26:19 +01:00
Ronald Barendse
ace5c54da2 Remove unused/untested dependent files support from IAppPolicyCache 2024-01-11 14:25:54 +01:00
Bjarke Berg
e291fae01e Migrated ReportSite, OpenIddictCleanup and TemporaryFileCleanup to background jobs (#15555)
* Migrated ReportSite, OpenIddictCleanup and TemporaryFileCleanup to the new background jobs introduced in v13.

* Fixed delay and period
2024-01-11 13:18:10 +01:00
Bjarke Berg
d3dc85f31f Only update security stamp once per request (#15562)
* Add item in requestcache when security stamp is already updated in request

* Propagate constructur obsoletion to implementing services and fix unit tests

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-01-11 10:20:58 +01:00
Bjarke Berg
1e849ad539 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Build.props
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
2023-12-22 14:19:04 +01:00
Nikolaj Geisle
fc71724386 V14: Server information (#15497)
* Rename information endpoint to troubleshooting

* Rename information endpoint to troubleshooting

* Add new information endpoint

* Fix bad merge

* Add InformationServerController.cs back

* Update serverTime offset to non hard-coded value.

* Add dictionary to swagger models

* Update OpenApi.json file

* Rename map definition

* Add ServerConfigurationBaseModel

* Implement ServerConfigurationBaseModel.cs

* Updated OpenApi

* Updated endpoint to return correct type in openapi

* Use explicit class for server information

* Remove version endpoint, as that is contained in server information.

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-12-22 10:21:11 +01:00
Ronald Barendse
f705479767 Ensure artifact dependency keeps correct mode, ordering and checksum values (#15500) 2023-12-21 14:55:43 +01:00
Bjarke Berg
f8dda5a7b5 Post merge fixes 2023-12-13 16:25:28 +01:00
Bjarke Berg
95094361cc Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.Api.Delivery/Handlers/InitializeMemberApplicationNotificationHandler.cs
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.CollectionBuilders.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditorBase.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueCreator.cs
#	tests/Directory.Packages.props
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/helpLinks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListPropertyValueConverterTests.cs
#	version.json
2023-12-13 15:34:22 +01:00
Bjarke Berg
8a9e6ee82d Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	global.json
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoRichTextBlock.html
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/fr.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/tr.xml
#	src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJob.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/RecurringBackgroundJobHostedServiceRunner.cs
#	src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
#	src/Umbraco.Web.UI.Client/src/views/components/application/umb-login.html
#	src/Umbraco.Web.UI/Startup.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJobTests.cs
#	version.json
2023-12-13 09:55:34 +01:00
Bjarke Berg
cf2ec50d15 Merge remote-tracking branch 'origin/release/12.3.4' into v12/dev
# Conflicts:
#	version.json
2023-12-08 13:34:41 +01:00
Sebastiaan Janssen
319d98ef23 Merge branch 'v12/dev' into contrib 2023-12-05 12:36:34 +01:00
kjac
55c901e2d7 Merge branch 'v13/dev' into release/13.0 2023-12-03 14:54:11 +01:00
Brett Smith
ecc31a308a Added BlockEditorDataConverter method to BlockListPropertyEditorBase … (#14960) 2023-11-30 17:21:09 +01:00
Erik-Jan Westendorp
c0e0e7bad8 Add HealthCheckCompletedNotification (#15276) 2023-11-30 15:53:05 +01:00
Kenn Jacobsen
42234cdd40 Move system information away from the User API (#15316)
* Move system information away from the User API

* Review comments
2023-11-30 14:29:16 +01:00
Kenn Jacobsen
016709eecd Add query string info to links in API output (#15327) 2023-11-30 10:36:53 +01:00
Kenn Jacobsen
88f907912b Cache block item constructors for block based editors (#15264)
* Cache block item constructors for block based editors

* Fix unit tests

* Fixed Grid unit tests

* Clear constructor caches when content types and data types change (to support InMemoryAuto models)
2023-11-29 12:27:07 +01:00
Bjarke Berg
ddf9f05a8f Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	version.json
2023-11-28 15:18:24 +01:00
Bjarke Berg
1f527fefd8 Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
2023-11-28 11:20:02 +01:00
Bjarke Berg
280518c9d6 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.ManagementApi/Umbraco.Cms.ManagementApi.csproj
#	src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs
#	src/Umbraco.Web.UI.Client/.nvmrc
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
2023-11-28 09:39:31 +01:00
Bjarke Berg
ab781560bc Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
2023-11-27 19:47:24 +01:00
Bjarke Berg
bf8af4588e Centralised NuGet packages (#15293)
* Moved to centralized nuget packages

* Handle JsonSchema

* Change PackageReference to PackageVersion

* Opt out of central package management for mangement api (at least for versions less than 14) and the UI project

* ManagePackageVersionsCentrally = false

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* Change folder acceptance tests are build, to avoid reading the test Directory.Packages.props

* change working directory

* workingDirectory

* Force the template to use local nuget packages

* Force the template to use local nuget packages

* clean up

* added wait on

* added wait on
2023-11-27 15:18:00 +01:00
Ronald Barendse
5ad400184a Fix IWebhook.GetUdi() and IEntity.GetUdi() extension methods (#15288)
* Fix IWebhook and IEntity GetUdi extension method

* Refactor to use switch expressions

* Add GetUdiForWebhook test

* Added a webhook builder for unit tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2023-11-23 08:02:57 +01:00
Kenn Jacobsen
012b43a1c2 Publishing in the Management API (#14774)
* make CoreScopeProvider available for derived classes

* Create publish controller

* Add publish functionality

* Remove unneeded using

* Implement publish for multiple cultures

* support multiple cultures in controler

* Dont validate properties

* Refactor to use PublishingOperationStatus

* refactor to use proper publish async methods

* Refactor publish logic into own service

* Commit some demo code

* Add notes about what errors can happen when publishing

* Rework ContentPublishingService and introduce explicit Publish and PublishBranch methods in ContentService

* Fix merge

* Allow the publishing strategy to do its job

* Improved check for unsaved changes

* Make the old content controller work (as best possible)

* Remove SaveAndPublish (SaveAndPublishBranch) from all tests

* Proper guards for invalid cultures when publishing

* Fix edge cases for property validation and content unpublishing + add unpublishing to ContentPublishingService

* Clear out a few TODOs - we'll accept the behavior for now

* Unpublish controller

* Fix merge

* Fix branch publish notifications

* Added extra test for publishing unpublished cultures and added FIXME comments for when we fix the state of published cultures in content

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-11-22 12:52:08 +01:00
Ronald Barendse
a77b77d98a Remove AngleSharp package reference 2023-11-21 10:51:02 +01:00
Bjarke Berg
5b3e9c580a Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	version.json
2023-11-16 09:12:01 +01:00
Bjarke Berg
04e59e9a9d Fixed a couple of occurrences where scopes was auto-completed while modified db state (#14947)
* Fixed a couple of occurrences where scopes was auto-complated while actually modified the state of the database.

* Added temp ctor to fix boot issue

(cherry picked from commit 41f8f03c2c)
2023-11-15 09:45:23 +01:00
Bjarke Berg
65b7967fed Updated to .NET 8 final (#15204) 2023-11-15 09:29:50 +01:00
Bjarke Berg
fb55e1b244 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
2023-11-14 13:22:10 +01:00
Bjarke Berg
80631e77c9 Post merge fixes with versions and updated nuget packages 2023-11-14 12:49:02 +01:00
Bjarke Berg
c22783e45e Merge remote-tracking branch 'origin/release/13.0' into v13/dev 2023-11-14 12:43:11 +01:00
Kenn Jacobsen
4d98937af9 Delivery API nested property expansion and output limiting (#15124)
* V2 output expansion + field limiting incl. deprecation of V1 APIs

* Performance optimizations for Content and Block based property editors

* A little formatting

* Support API versioning in Delivery API endpoint matcher policy

* Add V2 "expand" and "fields" to Swagger docs

* Renamed route for "multiple items by ID"

* Review changes

* Update src/Umbraco.Cms.Api.Delivery/Controllers/Media/ByIdMediaApiController.cs

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

* Update src/Umbraco.Cms.Api.Delivery/Filters/SwaggerDocumentationFilterBase.cs

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

* Update src/Umbraco.Cms.Api.Delivery/Filters/SwaggerDocumentationFilterBase.cs

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

* Revert "Performance optimizations for Content and Block based property editors"

This reverts commit 0d5a57956b36e94ce951f1dad7a7f3f43eb1f60b.

* Introduce explicit API cache levels for property expansion

* Friendly handling of bad expand/fields parameters

---------

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-11-14 11:16:12 +01:00
Bjarke Berg
162a6a0085 Post merge 2023-11-14 09:39:39 +01:00
Bjarke Berg
cea6c3f20e Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-11-14 09:31:25 +01:00
Bjarke Berg
fee9bf12c0 Updated nuget packages 2023-11-13 18:56:57 +01:00
Bjarke Berg
633f649be9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/Umbraco.Cms.ManagementApi.csproj
#	src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs
2023-11-13 18:40:11 +01:00