Commit Graph

722 Commits

Author SHA1 Message Date
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
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
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
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
Mole
7abfd146ad Ensure EfCore is known regardless of DeliveryApi (#14678) 2023-08-14 15:15:44 +02:00
Bjarke Berg
843d41e564 Update .net 8 to preview 7 2023-08-09 15:53:31 +02:00
Bjarke Berg
d9f528f3ae Post merge fixes 2023-08-08 12:19:29 +02:00
Bjarke Berg
2839131033 Merge remote-tracking branch 'origin/v13/dev' into v14/dev 2023-08-08 12:10:18 +02:00
Bjarke Berg
dce320839c Updated .net 8 to preview 6 2023-08-08 12:05:53 +02:00
Bjarke Berg
bbaa2a2212 Added CompatibilitySuppressions for .NET7 2023-08-02 09:46:31 +02:00
nikolajlauridsen
7ed856ae8e Comment out richtext test
This should no longer be nececary in new backoffice
2023-07-21 12:21:56 +02:00
nikolajlauridsen
90598dce0b Re-add package validation skips 2023-07-21 11:28:35 +02:00
nikolajlauridsen
7753df40ce Merge v13/dev 2023-07-21 10:59:47 +02:00
nikolajlauridsen
28dae0387f Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	Directory.Build.props
2023-07-21 10:20:08 +02:00
nikolajlauridsen
04a10be2a9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2023-07-21 10:17:57 +02:00
nikolajlauridsen
0884ee0a4e Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
2023-07-21 10:16:50 +02:00
Andy Butland
3a857ab584 Added tests for TopoGraph. (#14583) 2023-07-20 08:33:49 +02:00
Sebastiaan Janssen
dad49b846f Merge branch 'v12/dev' into contrib 2023-07-18 11:18:26 +02:00
Elitsa Marinovska
ba423a0108 V12: Add ISO codes to make the migration from language IDs easier (#14567)
* Change the obsoletion messages for language IDs to target V14 instead of V13.

* Wrong Language file

* Add ISO codes required to migrate custom code from language IDs

* Population of the new language FallbackIsoCode prop

* Changing obsoletion msgs from v13 to v14

* Fix breaking changes
2023-07-18 10:53:14 +02:00
Mole
d306a65bd4 V14: Fix pipelines (#14566)
* Try undoing inheritance change

Just to see if the issue stems from there

* Try specifying order again

* Log something

* Maybe it's a culture thing

* That wasn't it

* Maybe content deliver need to exist as an applicationPart

* Order found types

* Cleanup
2023-07-18 10:18:31 +02:00
Jacob Overgaard
ab836d2326 V10: Find and persist embedded images in rich text (#14546)
* add method to find and persist embedded base64 (data-uri) images in a html string

* use method to find embedded images in the Umbraco.TinyMce and Umbraco.Grid property editors

* rename method to better reflect what it does

* set allowed upload file types for integration tests

* add test for embedded images in Umbraco.TinyMce

* let old ctor call new ctor

* Apply suggestions from code review

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

* apply pattern matching

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-07-18 09:17:19 +02:00
Nikolaj Geisle
b31c59d2a5 V14: refactor property editor aliases (#14536)
* Rename migrations folder to v14

* Add renaming migration

* Add missing namespace to migration in plan

* Rename Tiny to richtext

* Obsolete old TinyMce

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-14 15:31:09 +03:00
nikolajlauridsen
f533d923d8 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
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/playwright.config.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorAdvanced.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorAreasContent.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorContent.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorRendering.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorSettings.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorContent.spec.ts
#	version.json
2023-07-14 10:04:53 +02:00
Jacob Overgaard
6f417722ac Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-07-12 15:06:29 +02:00
Nikolaj Geisle
e40f1839c4 V14: Refactor LogViewerService (#14511)
* Refactor GetPagedLogsAsync to not use ILogViewer

* Refactor GetPagedLogsAsync to not use ILogViewer

* Reorder using statements

* Introduce ILogViewerRepository

* Remove skip and take from repository

* Return IEnumerable instead of pagedModel

* Remove local GetLogs

* Return IEnumerable instead of pagedmodel

* Remove serilog entirely from ILogViewerService

* Move LogViewerService

* Inject LogViewerService as core service instead

* Implement LogViewerServiceTests.cs

* Add more happy path tests

* Add saved query tests

* Refactor private path fields  to normal variables in setup method

* Capitalize logs for Unix systems

* Added missing documentation

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-10 15:36:20 +03:00
Andreas Zerbst
313fdf79fe Added test for checking if settings model contains default value (#14513)
* Added test for checking if a settings model contains default value.
Fixed tests

* Bumped version

* Moved createSliderWithDefaultValue function to our testHelpers. Removed the use of count in test since there was only one
2023-07-10 10:38:43 +02:00
Andreas Zerbst
45083b6735 Removed usage of sending umbracoApi to our testHelpers (#14526)
* Cleaned up in Advanced

* Cleaned up in Areas

* Cleaned up in Content

* Cleaned up in Rendering

* Cleaned up in Settings

* Updated the timeout to 40 seconds, 30 seconds is not always enough anymore.

* Bumped version of testhelpers and builders
2023-07-07 14:49:08 +02:00
Bjarke Berg
47d5ef88c4 Post merge fixes - Including temp workaround for .net8 efcore breaking change (Should be fixed again in preview 7) 2023-07-07 10:55:29 +02:00
Bjarke Berg
d991285466 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Build.props
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2023-07-07 08:56:17 +02:00
Bjarke Berg
fe6cdb0f17 Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-07-07 08:48:33 +02:00
Bjarke Berg
16c78b76dd Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2023-07-07 08:37:20 +02:00
Bjarke Berg
02e87233c1 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js
2023-07-07 08:34:15 +02:00
Bjarke Berg
41805af0d9 Updated the package validation baseline version to 12.0.0 (#14389)
* Updated the package validation baseline version to 12 RC1

* Update PackageValidationBaselineVersion to 12.0.0 and remove CompatibilitySuppressions.xml files

* Clean up project files

---------

Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-07-06 07:51:49 +02:00
Bjarke Berg
0ad0f86e6e Update to dotnet 8 preview 5 (#14492)
* Update to .net 8 preview 1

* Update npoco to 5.7.0

* Update pipeline to use .net 8

* Revert "Update npoco to 5.7.0"

This reverts commit f7795afa77a41ef2719f639405f73d9c21e4b12e.

* Fix tests and updated OpenApi.json

* use dotnet 8 in linux container

* Updated templates and docker image to dotnet 8

* Bugfix

* R
Updated docker images to 8.0 preview 1

* linux docker images updated

* Force use c# 11, in hope of the acceptance tests will pass

* Do not use C# 8 :)

* Update to preview 2

* CompatibilitySuppressions

* updated templates

* Disable package validation

* Update to .net8 preview 4

* change EnableStrictModeForCompatibleFrameworksInPackage to false

* Package validation

* Added CompatibilitySuppressions.xml

* Fix up IP networks

* Updated to preview 5

* Update docker images

* Post merge fixes

* Try to update dotnet version of codeql

* Delete empty suppression files

* Remove dependency

* Cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-05 14:13:52 +03:00
Bjarke Berg
59df7439db Verify user invite token (#14491)
* Added functionality to verify user invite tokens and create the initial password

* Add response types

* Fail ValidateCredentialsAsync when user is not approved

* Enable user as part of initial password creating using validation token

* Adds documentation to badrequest and changed nocontent to ok, to align with other APIs

* Fixed tests and added a new one

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2023-07-05 12:42:52 +02:00
Sebastiaan Janssen
c4c524deb5 Merge branch 'v12/dev' into contrib 2023-07-04 11:14:47 +02:00
Maarten
3f196a9de4 Fix broken CookieAuthenticationRedirect caused by PR #14036 for non-api requests (#14399)
* Fix broken CookieAuthenticationRedirect caused by PR #14036 when not in an API controller

* Added Integration Tests for the MemberAuthorizationFilter

* Fix merge conflict

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
(cherry picked from commit 1d239a30ca)
2023-07-04 11:10:58 +02:00
Maarten
1d239a30ca Fix broken CookieAuthenticationRedirect caused by PR #14036 for non-api requests (#14399)
* Fix broken CookieAuthenticationRedirect caused by PR #14036 when not in an API controller

* Added Integration Tests for the MemberAuthorizationFilter

* Fix merge conflict

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-04 10:37:13 +03:00
Andreas Zerbst
85ad419cb7 Updated our API acceptance tests to use our updated testHelpers (#14476)
* Updated our dataType API tests to use our updated testHelpers

* Updated our dataTypeFolder API tests to use our updated testHelpers

* Updated our dictionary API tests to use our updated testHelpers

* Updated our language API tests to use our updated testHelpers

* Updated our partialView API tests to use our updated testHelpers

* Updated our partialViewFolder API tests to use our updated testHelpers

* Updated our script API tests to use our updated testHelpers

* Updated our scriptFolder API tests to use our updated testHelpers

* Updated our stylesheet API tests to use our updated testHelpers

* Updated our stylesheetFolder API tests to use our updated testHelpers

* Updated our telemetry API tests to use our updated testHelpers

* Updated our template API tests to use our updated testHelpers

* Updated our temporaryFile API tests to use our updated testHelpers

* Updated our user API tests to use our updated testHelpers

* Updated our userAvatar API tests to use our updated testHelpers

* Updated our userGroup API tests to use our updated testHelpers

* Fixed failing text

* Bumped to use the newest version of our testHelpers
2023-06-29 07:16:33 +02:00
Bjarke Berg
7265d5c3be Use OpenIddict with real db instead of inmemory (#14465)
* Add OpenIddict tables to database (#14449)

* Added migrations to install EF Core OpenIddict tables

* Handle Install of ef core data (Needs to be outside of transaction

* Cleanup and renaming, as these things will be reused for more than openiddict in the future

* Cleanup

* Extract db context setup

* Minor cleanup

---------

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

* Use OpenIddict from DB instead of InMemoryDb

* Do not try to clean up, while not it run mode

* Fixed tests

* Clean up

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-06-28 09:40:28 +03:00
Bjarke Berg
4aa7001fbf Merge remote-tracking branch 'origin/v12/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2023-06-27 09:50:37 +02:00
Bjarke Berg
f04b49a96c Merge remote-tracking branch 'origin/release/12.0' into v12/dev 2023-06-27 09:18:08 +02:00
Andreas Zerbst
437db52e5e Added UI acceptance for the telemetry section (#14456)
* Added auth to gitignore

* Added a setup for logging in which allows us to save the token for the user

* Added simple acceptance test for testing our api for the DataTypes

* Added simple acceptance tests for testing the API for the PartialView section

* Added simple acceptance tests for testing the API for the Script section

* Added acceptance tests for testing the API for the Stylesheet section.

* Added acceptance tests for testing the API for the User section

* Bumped the version of our testhelpers!

* Added acceptance tests for testing the API for the Dictionary section.

* Added acceptance tests for testing the API for the Language section.

* Added acceptance tests for testing the API for the UserGroups section.

* Added acceptance tests for testing the API for the Template section

* Added acceptance tests for testing the API for the TemporaryFiles section

* Our first UI test for v14

Added acceptance tests for the telemetry section

* Removed page.pause
2023-06-26 15:05:50 +02:00