Commit Graph

42810 Commits

Author SHA1 Message Date
Elitsa Marinovska
2c8927c2e9 Rename old FIXME to TODO (#13646)
* Rename old FIXME to TODO, so we can track new FIXME starting v13

* Remove empty TODO
2023-01-18 12:28:54 +01:00
Kenn Jacobsen
de8e307295 Add "is trashed" data for content and media tree controllers (#13687) 2023-01-17 14:04:22 +01:00
Kenn Jacobsen
25f66e7413 Turn the indexer health status into an enum + rearrange the view models according to controller namespaces (#13686) 2023-01-17 14:04:13 +01:00
Mole
13fb2a4f52 New Backoffice: Refactor migrations to allow for unscoped migrations (#13654)
* Remove PostMigrations

These should be replaced with Notification usage

* Remove outer scope from Upgrader

* Remove unececary null check

* Add marker base class for migrations

* Enable scopeless migrations

* Remove unnecessary state check

The final state of the migration is no longer necessarily the final state of the plan.

* Extend ExecutedMigrationPlan

* Ensure that MigrationPlanExecutor.Execute always returns a result.

* Always save final state, regardless of errors

* Remove obsolete Execute

* Add Umbraco specific migration notification

* Publish notification after umbraco migration

* Throw the exception that failed a migration after publishing notification

* Handle notification publishing in DatabaseBuilder

* Fix tests

* Remember to complete scope

* Clean up MigrationPlanExecutor

* Run each package migration in a separate scope

* Add PartialMigrationsTests

* Add unhappy path test

* Fix bug shown by test

* Move PartialMigrationsTests into the correct folder

* Comment out refresh cache in data type migration

Need to add this back again as a notification handler or something.

* Start working on a notification test

* Allow migrations to request a cache rebuild

* Set RebuildCache from MigrateDataTypeConfigurations

* Clean MigrationPlanExecutor

* Add comment explaining the need to partial migration success

* Fix tests

* Allow overriding DefinePlan of UmbracoPlan

This is needed to test the DatabaseBuilder

* Fix notification test

* Don't throw exception to be immediately re-caught

* Assert that scopes notification are always published

* Ensure that scopes are created when requested

* Make test classes internal.

It doesn't really matter, but this way it doesn't show up in intellisense

* Add notification handler for clearing cookies

* Add CompatibilitySuppressions

* Rename Execute to ExecutePlan

We have to do this to be able to obsolete :(

* Update CompatibilitySuppressions

* Update src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs

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

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-01-16 14:52:51 +01:00
Kenn Jacobsen
01224fce89 Template API for new backoffice (#13642)
* Template query builder API

* Create a dedicated template service (copy template operations from file service)

* CRUD API for templates

* Make file service consume the template service (remove duplicated code)

* Use the template service in the old template controller so we can track changes better (note: this is breaking, but it doesn't matter as the controller will be deleted)

* Add scaffolding to the template API

* Make the route differ between query settings and execution

* Get rid of ugly string constants

* Refactor query execution a little to improve code health

* Fix build checks (compat)

* Deduce the master template from the template contents

* Make template service async, move master template parsing into template service

* Fix open API test

* Make sure the unit tests use new template parsing

* Add FIXME for SetMasterTemplate

* added obsolete attributes

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-01-11 14:40:41 +01:00
Nikolaj Geisle
c81918c9ee Return true if connectionstring configured (#13640)
Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-09 08:53:31 +01:00
Bjarke Berg
08c1708730 Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/ManagementApiControllerBase.cs
2023-01-06 10:30:58 +01:00
Bjarke Berg
84d78e1393 Merge 2023-01-06 10:14:59 +01:00
Kenn Jacobsen
c44fa56661 New backoffice: Data type API (#13633)
* Add PropertyEditorUiAlias to datatype incl. migration for persistence

* Add configuration validation

* Folder CRUD (reusable for other folder trees) + datatype delete + more RESTish response from datatype create and update

* API for datatype references

* Clean up response types, swagger metadata and fix OpenAPI test

* Allow breakage in the build

* Use yield return pattern

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

* Fix incorrect return type from references API

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2023-01-06 08:45:06 +01:00
Bjarke Berg
6d8a3c550f Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-06 08:44:50 +01:00
Elitsa Marinovska
b4ca2a6636 Fixing a few nullable reference types for log viewer (#13634) 2023-01-04 09:24:43 +01:00
Kenn Jacobsen
d1fd1f16fd Move resources and implementations for System.Text.Json for reuse across projects (#13626)
* Moved resources and implementations for System.Text.Json for reuse across projects.

* Move MvcBuilderExtensions as well
2023-01-03 15:34:23 +01:00
Kenn Jacobsen
a8f070d834 Datatype configuration refactor (#13605)
* Moved refactor from V12 based branch

* Remove obsolete config property to avoid obsoletion warnings

* Clean up test models

* Make the datatype API a little less confusing by introducing explicit models for create and update

* Remame "Configuration" to "Data" to make FE happy :)

* Safeguard deserialization of empty configs

* Less strict number handling for deserialization

* Prepare for data type config migrations

* Attempt to have contextual config serializers

* Update OpenAPI spec with (temporary) data type controller

* Fix unit tests

* Update compat suppressions (allow breakage for datatype and configuration editor)

* Make the duplicate JsonObjectConverter implementation private
2022-12-21 14:29:59 +01:00
Nikolaj
2b72df09bb Merge branch 'release/11.1' into v11/dev 2022-12-21 13:54:29 +01:00
Nikolaj
392b48f159 Merge branch 'release/10.4' into v10/dev 2022-12-21 13:53:58 +01:00
Nikolaj Geisle
f37c02ea79 V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-21 10:07:11 +01:00
Nikolaj Geisle
a364141efa V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-21 09:57:00 +01:00
Bjarke Berg
a1ef0903c9 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-20 10:20:44 +01:00
Bjarke Berg
03e00cbed2 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-20 10:19:36 +01:00
Bjarke Berg
fae74c53ba Merge remote-tracking branch 'origin/release/10.4' into v10/dev 2022-12-20 10:18:14 +01:00
Nikolaj Geisle
d62e2d731b V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-20 09:53:54 +01:00
Bjarke Berg
9c087f584d Fixed build warnings in ManagementApi 2022-12-20 08:53:37 +01:00
Ronald Barendse
832e44cb01 Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-20 08:31:37 +01:00
Ronald Barendse
58da7f754b Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-20 08:31:37 +01:00
Ronald Barendse
751c1883ce Fix GetBackOfficeUrl extension method 2022-12-20 08:31:37 +01:00
Bjarke Berg
1332ba51e8 Merge pull request #13599 from umbraco/v11/bugfix/getbackofficeurl
Add `GetUmbracoBackOfficeUrl` extension methods
2022-12-20 08:30:45 +01:00
Bjarke Berg
e375ab4b1b Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 08:10:47 +01:00
Bjarke Berg
6430c61ee9 Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 07:00:07 +01:00
Elitsa Marinovska
fef793326f New Backoffice: Health check controller (#13543)
* Adding health check controllers - getAll & getGroupByName

* Adding HealthCheckGroup mapper

* Adding viewModels

* Adding a factory for building a health check group with result view model

* Registering the mapper and factory

* Updating OpenApi.json

* Remove unnecessary checks - we instantiate the target before calling the Map()

* Adding ProducesResponseType for GetAll()

* Fixing usings

* Making checks required for a health check group

* Adding OK() around result to be explicit

* Adding default values to skip and take

* Adding Umbraco.Code comments

* Removing ? from HealthCheckGroupWithResultViewModel return type

* Move the grouping creation to the factory

* Adding Actions[] for each health check + mapping

* Defaulting ValueRequired to false

* Refactoring routes - from health-check to health-check-group

* Move to HealthCheckGroup folder

* Fix OpenApi.json

* Changing class name and making Key of HealthCheckActionViewModel non-nullable

* Fixing namespace

* Migrating ExecuteAction endpoint

* Add execute-action endpoint to OpenApi.json

* Use Task.FromResult() around the action result

* Fixing namespaces and swagger group name

* Fixing naming of the key in the health check action

* Fix tag names in OpenApi.json
2022-12-19 13:50:18 +01:00
Ronald Barendse
532636cdbe Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-19 12:04:35 +01:00
Ronald Barendse
900dd22277 Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-19 11:52:48 +01:00
Ronald Barendse
b457734f18 Fix GetBackOfficeUrl extension method 2022-12-19 11:31:18 +01:00
Kenn Jacobsen
ab82549fd6 Support space (and more) in tag groups (#13589) 2022-12-16 14:25:30 +01:00
Kenn Jacobsen
d173a99fc8 Support space (and more) in tag groups (#13589) 2022-12-16 14:24:51 +01:00
nikolajlauridsen
6835436ed5 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-16 14:24:17 +01:00
Kenn Jacobsen
9c21951d02 Support space (and more) in tag groups (#13589) 2022-12-16 14:23:31 +01:00
Kenn Jacobsen
a5a80fdd41 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:07:40 +01:00
Kenn Jacobsen
aee1d70f64 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:06:27 +01:00
Ronald Barendse
4d760a54c8 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 13:00:39 +01:00
Kenn Jacobsen
a897e3bdd3 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:42:50 +01:00
Kenn Jacobsen
7b0f678c38 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:41:19 +01:00
Ronald Barendse
48f4d8b7d1 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 11:25:00 +01:00
Ronald Barendse
544cb30602 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-12-16 11:17:56 +01:00
Nikolaj
adfc38503c Upgrade BPlusTree dependency 2022-12-15 14:06:59 +01:00
Nikolaj
e86b90faff Merge branch 'v11/dev' into v12/dev 2022-12-15 14:03:22 +01:00
Nikolaj
0234c5b637 Roll back BPlusTree dependency 2022-12-15 13:56:57 +01:00
Bjarke Berg
ace43452e4 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-12-15 10:36:23 +01:00
Bjarke Berg
6f4b60c76c Updated Nuget packages 2022-12-15 10:36:13 +01:00
Mole
0b04ae76da New backoffice: Redirect Url Management controller (#13572)
* Add status endpoint

* Refactor GetStatus to use a factory for the viewmodel

* Move controllers to correct namespace

* Add response type to GetStatus

* Create query endpoint

* Create GetAll endpoint

* Add by key

* Add delete by key

* Rename enabled controller

* Add SetEnabled endpoint

* Update OpenApi.json

* Replace query endpoint with a optional filter parameter

* Use enum to enabled and disable url tracking

* Update OpenApi.json

* Add bad request response type to GetAll endpoint
2022-12-15 10:04:44 +01:00
Nikolaj
2bab96fb85 Merge remote-tracking branch 'origin/v11/dev' into v12/dev 2022-12-15 09:56:28 +01:00