Commit Graph

44199 Commits

Author SHA1 Message Date
Nathan Woulfe
27441dfee1 Don't pass content object to save method - it's not a suitable label key :) (#14496)
* don't set label key to entire content model...

* Remove the default parameter value

---------

Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 5dfb914e0f)
2023-08-28 09:46:44 +02:00
Kenn Jacobsen
f2d11e3095 Add content and media sorting to the Management API (#14712)
* Add content and media sorting to the Management API

* Rename "id" to "key" throughout the ContentEditingService

* Update Open API json file

* Use "key" instead of "id" in ContentEditingServiceBase

* Use "key" instead of "id" in IMediaEditingService and MediaEditingService

* Turn delegates into abstracts + fix bug that allowed deleting items outside of the recycle bin

* Use PUT instead of POST

* Update src/Umbraco.Core/Services/MediaEditingService.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Core/Services/MediaEditingService.cs

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Update Open API JSON

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-08-28 08:56:57 +02:00
Bjarke Berg
3a53f51ef3 Remove parsing of short into integer (#14721) 2023-08-25 13:08:51 +02:00
Bjarke Berg
1198c76d67 Remove parsing of short into integer (#14721) 2023-08-25 13:07:42 +02:00
Christian Funder Sommerlund
fec51a9ec5 Add ReSharperTestRunner64 to the assembly exclusion list in TypeFinder (#14498) 2023-08-24 13:06:21 +02:00
Nikolaj
869b480dae Bump version 2023-08-24 10:49:50 +02:00
Nikolaj
12704b112e Merge branch 'release/10.7' into v10/dev 2023-08-24 10:49:11 +02:00
Nikolaj
f2b0c0e8eb Bump version 2023-08-24 10:44:01 +02:00
Nikolaj Brask-Nielsen
3f6ebe7656 feat: Let the DbContext handle the connection to the database (#14674) 2023-08-24 10:15:18 +02:00
Kenn Jacobsen
a9d7f3cbbb Content type and media type container CRUD controllers and services (#14682)
* CRUD for content and media type folders + refactor data type folder CRUD controllers and services to match

* Correct response types + update OpenAPI JSON

* Review changes

* Review changes

* Update OpenAPI JSON after merge
2023-08-24 09:32:36 +02:00
Andreas Zerbst
98bcf15373 Added missing scope (#14711) 2023-08-23 13:24:16 +02:00
Ronald Barendse
f97e9a9f34 Fix exceptions in Slider and Tags property value converters (#13782)
* Fix IndexOutOfRangeException when converting single value to range in SliderValueConverter

* Fix NullReferenceException while deserializing empty value in TagsValueConverter

* Use invariant decimal parsing

* Handle converting from slider to single value

* Fix parsing range as single value

* Make Handle methods autonomous

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-08-23 10:55:48 +02:00
Ronald Barendse
3c37653012 Fix exceptions in Slider and Tags property value converters (#13782)
* Fix IndexOutOfRangeException when converting single value to range in SliderValueConverter

* Fix NullReferenceException while deserializing empty value in TagsValueConverter

* Use invariant decimal parsing

* Handle converting from slider to single value

* Fix parsing range as single value

* Make Handle methods autonomous

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-08-23 10:50:25 +02:00
Ronald Barendse
e5a8d01004 Fix exceptions in Slider and Tags property value converters (#13782)
* Fix IndexOutOfRangeException when converting single value to range in SliderValueConverter

* Fix NullReferenceException while deserializing empty value in TagsValueConverter

* Use invariant decimal parsing

* Handle converting from slider to single value

* Fix parsing range as single value

* Make Handle methods autonomous

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-08-23 10:09:43 +02:00
Elitsa Marinovska
d553297369 V12: Get multiple items by ids endpoints (#14702)
* Adding get multiple items by their ids endpoint

* Adding get multiple items by their ids endpoint for the Media API as well
2023-08-23 07:13:20 +02:00
Nikolaj Brask-Nielsen
7b336c45f7 perf: Don't call GetNextUsers when we don't have to (#14670) 2023-08-22 15:52:27 +01:00
Andy Butland
9fd0b1986c Updated JSON schema reference for Umbraco Forms. (#14701) 2023-08-22 13:30:26 +02:00
Andy Butland
80ea5174c6 Updated JSON schema reference for Umbraco Forms. (#14701) 2023-08-22 13:28:01 +02:00
Niels Lyngsø
19ee8e9254 directly render labels without angularJS template code (#14700) 2023-08-22 12:54:36 +02:00
Niels Lyngsø
e1b4aebb0f directly render labels without angularJS template code (#14700) 2023-08-22 11:35:38 +02:00
Niels Lyngsø
38910a8d5c directly render labels without angularJS template code (#14700) 2023-08-22 11:27:16 +02:00
Nathan Woulfe
5dfb914e0f Don't pass content object to save method - it's not a suitable label key :) (#14496)
* don't set label key to entire content model...

* Remove the default parameter value

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-08-22 11:10:58 +02:00
Nikolaj
380af0057b Bump version 2023-08-22 10:25:55 +02:00
Nikolaj
85f81ed44c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-22 10:24:26 +02:00
Nikolaj Brask-Nielsen
a5a6fe4f76 docs: Improve DbContext XML docs (#14673) 2023-08-22 09:34:19 +02:00
Nikolaj Brask-Nielsen
9a63542645 refactor: Only use pooled DbContexts (#14672) 2023-08-21 14:55:41 +02:00
Kenn Jacobsen
66bbad3379 Media Delivery API (#14692)
* Introduce media API - controllers, services, tests, Swagger docs

* Add path to media API response + add "by path" endpoint

* Review comments

* Implement filtering and sorting

* Add explicit media access configuration

* Cleanup

* Adding default case as in the MediaApiControllerBase

* Update src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs

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

* Swap sort order calculation to align with Content API

* Add CreateDate and UpdateDate to media responses

* Mirror Content Delivery API behavior for empty children selector

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-08-21 13:57:36 +02:00
Kenn Jacobsen
0dc18982ee Do not allow content type property aliases that conflict with IPublishedElement (#14683) 2023-08-21 13:17:15 +02:00
Sven Geusens
311d322129 Add code infrastructure to validate file content (#14657)
* Implemented modular architecture for filestream security sanitization with an svg-html example

* 31440: Refactoring, applied to more entry points and removed test analyzer

* 31440 Added Unittests for FileStreamSecurityValidator

* PR fixes and better unittest mock names

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-08-21 13:08:26 +02:00
Bjarke Berg
b1e42e334d Move to Minimal Hosting Model in a backwards compatible way (#14656)
* Use minimal hosting model

* Make CoreRuntime backward compatible to the old hosting model

* Remove unneccessary methods from interface again

* Pushed the timeout for E2E test to 120 minutes instead of 60

* Updated the preview version from 6 to 7

* Explicitly call BootUmbracoAsync

* Add CreateUmbracoBuilder extension method

* Do not add IRuntime as hosted service when using WebApplication/WebApplicationBuilder

* Set StaticServiceProvider.Instance before booting

* Ensure Umbraco is booted and StaticServiceProvider.Instance is set before configuring middleware

* Do not enable static web assets on production environments

* Removed root namespace from viewImports

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-08-21 12:24:17 +02:00
Bjarke Berg
6f10517fc6 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	build/azure-pipelines.yml
2023-08-21 08:05:22 +02:00
Bjarke Berg
84cd7a163c Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-08-21 08:03:18 +02:00
Bjarke Berg
29d0c6770c Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-08-21 08:02:15 +02:00
Bjarke Berg
d676850f6c Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-21 07:58:22 +02:00
Andreas Zerbst
e7af98027d Updated the name of our Acceptance test project in the pipeline (#14691)
* Updated the name of our Acceptance test project.

The reason is because we want the naming to be clear and concise.

* Changed the name of the e2e pipeline project name for linux

* Updated dll file
2023-08-18 13:36:54 +03:00
Kenn Jacobsen
0096addcb9 Content and media type CRUD controllers and services (#14665)
* Add GetAsync method

* Fix up delete document type controller

* Add scope to delete async

* Add some scaffolding

* Add create model

* Start working on validation

* Move validation to its own service

* Use GetAllAsync instead of GetAsync

* Add initial composition support

Still need to figure out some kinks

* Validate compositions when creating

* Add initial folder support

* Initial handling of generic properties

* Add operation status responses

* Move create operation into service

* Add first test

* Fix issued shown by test

* Ensure a specific key can be specified when creating

* Rename container id to container key

Let's try and be consistent

* Create basic composition test

* Ensure new property groups are created with the correct key

* Add test showing property type issue

* Fix property types not using the expected key.

* Validate against model fetched from content type service

Just to make sure nothing explodes on the round trip

* Make helper for creating create models

* Add helper for creating container

* Make helper methods simpler to use

* Add test for compositions using compositions

* Add more composition tests

* Fix bug allowing element types to be composed by non element types

* Remove validators

This can just be a part of the editing service

* Minor cleanup

* Ensure that multiple levels of inheritance is possible

* Ensure doctype cannot be used as both composition and inheritance on the same doctype

* Ensure no duplicate aliases from composition and that compositions exists

* Minor cleanup

* Address todos

* Add SaveAsync method

* Renamed some models

* Rename from DocumentType to ContentType

* Clarify ParentKey as being container only + untangle things a tiny bit

* Clean out another TODO (less duplicate code) + more tests

* Refactor for reuse across different content types + add media type editing service + unit tests

* Refactor in preparation for update handling

* More tests + fixed bugs found while testing

* Simplify things a bit

* Content type update + a lot of unit tests + some refactor + fix bugs found while testing

* Begin building presentation factories for mapping view models to editing models

* Use async save

* Mapping factories and some clean-up

* Rename Key to Id (ParentKey to ParentId)

* Fix slight typo

* Use editing service in document type controllers and introduce media type controllers

* Validate containers and align container aliases with the current backoffice

* Remove ParentId from response

* Fix scope handling in DeleteAsync

* Refactor ContentTypeSort

* A little renaming for clarity + safeguard against changes to inheritance

* Persist allowed content types

* Fix bad merge + update controller response annotations

* Update OpenAPI JSON

* Update src/Umbraco.Cms.Api.Management/Controllers/DocumentType/DocumentTypeControllerBase.cs

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

* Fix review comments

* Update usage of MapCreateAsync to ValidateAndMapForCreationAsync

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-08-17 12:28:16 +02:00
Nikolaj Brask-Nielsen
d7cbd9bf61 fix: Translations keys from #12776 2023-08-17 10:38:27 +01:00
Mole
a1f6531453 V14: Consistently refer to user key (#14685)
* Fixup UserService

* Fixup PartialViewService

* Fixup ScriptService

* Fixup StylesheetService

* Use keys with usergroups instead of IDs

* Fix missed instances of performingUser

* Fixup DataTypeFolderControllerBase

---------

Co-authored-by: kjac <kja@umbraco.dk>
2023-08-17 08:35:48 +02:00
Nikolaj Brask-Nielsen
685b867456 fix: Pass correct user id to Audit log 2023-08-16 23:42:59 +01:00
Nikolaj Brask-Nielsen
d33c44c0a3 Fix userid zero in integration tests (#14639)
* test: Fix invalid user ids

* feat: Update parameter defaults with constants
2023-08-16 22:37:10 +01:00
Nikolaj Brask-Nielsen
3a7e388547 Adds hide toggle to hide unavailable compositions (#12776)
* feat: Added hide toggle to hide unavailable compositions

* fix: Fixed - being .

* chore: Move toggle to top
2023-08-16 15:44:05 +01:00
Bjarke Berg
fb3ead87b8 Post merge fixes 2023-08-15 11:18:10 +02:00
Bjarke Berg
822d57135e Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Cms.Persistence.EFCore/Composition/UmbracoEFCoreComposer.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorValues.cs
#	src/Umbraco.Web.UI.Docs/gulpfile.js
2023-08-15 11:14:00 +02:00
Bjarke Berg
7eda978cb1 Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-08-15 11:07:06 +02:00
Nikolaj
5f28f6d293 Merge branch 'release/12.1' into v12/dev
# Conflicts:
#	version.json
2023-08-15 11:02:43 +02:00
Bjarke Berg
b668fd47c6 Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-08-15 10:59:44 +02:00
Bjarke Berg
f39ae725a4 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-08-15 10:17:49 +02:00
Bjarke Berg
6f25d96b48 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-08-15 10:15:28 +02:00
Anders Reus
30f0cfc15d Add exclusion filter setting to typefinder settings (#14426)
* Obsolete constructor with deprecated IScopeProvider

* Add exclusion setting to typefinder settings

* The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat.

* Revert "The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat."

This reverts commit 87801c6c1cbaa6adab6f29dba1e876a586e05885.

* Add changes to TypeFinder

* Do not use null when type is not nullable

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-08-15 09:58:58 +02:00
Anders Reus
767bd1bcc0 Add exclusion filter setting to typefinder settings (#14426)
* Obsolete constructor with deprecated IScopeProvider

* Add exclusion setting to typefinder settings

* The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat.

* Revert "The old TypeFinder constructor calls the new constructor now instead and excluded duplicates by using Union instead of Concat."

This reverts commit 87801c6c1cbaa6adab6f29dba1e876a586e05885.

* Add changes to TypeFinder

* Do not use null when type is not nullable

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-08-15 09:46:27 +02:00