Commit Graph

45237 Commits

Author SHA1 Message Date
Bjarke Berg
fcda25af50 Premigrations + Updated NuGet Dependencies (#15987)
* Updated nuget packages + added migrations for OpenIddict - Currently can only be executed using unatttended installs

* Added new Premigration concept - Migrations that always runs unattended before other migrations

* Apply suggestions from code review

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

---------

Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-04-10 12:30:30 +02:00
Bjarke Berg
082d504b33 Fix tracked reference queries for SqlServer (#16020)
* Fixed issue with SqlServer and optimized queries to not do the actual paging if total count is 0

* Cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-10 12:03:32 +02:00
Jacob Overgaard
c241bfd85a update backoffice submodule 2024-04-10 11:56:59 +02:00
Ronald Barendse
4c3c3cd158 v14: Align Deploy interfaces, remove obsolete methods and default interface implementations (#15965)
* Align FromArtifact return type with IDataType.ConfigurationData

* Align Alias nullability with interface

* Lazily initialize ArtifactDependency collection when not set

* Remove ShouldSerializeChecksum (not used by STJ)

* Remove obsolete methods and default interface implementations

* Order dependencies once when setting collection

* Update test to include artifact Checksum property
2024-04-10 10:12:38 +02:00
Jacob Overgaard
eecb493585 use correct types for login build 2024-04-10 08:53:47 +02:00
Jacob Overgaard
fe7f79aacf update backoffice submodule 2024-04-09 17:45:44 +02:00
Kenn Jacobsen
41238d141a Move manifest endpoints to their own, independent API group and fix access policies accordingly (#15989)
* Move manifests to their own API group and fix access policies

* Update OpenApi.json

* add an endpoint to fetch "private" packages, i.e. AllowPublicAccess=false

* Review comments

* update OpenAPI.json

* update OpenApi.json

* allow /umbraco/logout to be used for PostLogoutRedirectUris when logging out through the management api

* use the Umbraco.Extensions string extensions instead

* add constraints to the BackofficeDefaultController to handle the cases of 'install', 'upgrade', and 'logout'

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-04-09 17:44:49 +02:00
Elitsa Marinovska
ac7e4c1fa3 Clean up comments that won't apply (#16018) 2024-04-09 12:07:55 +02:00
Sven Geusens
b8ae3e34ff Convert Tourdata into a more generic concept (#15923)
* Added UserData and migrated tours data into it

* Remove tourdata from user

* Removed tour definition/manipulation classes

Fixed a userData error typo

* Removed toursettings

* Update openapi spec

* V13: Align database schemas of migrated and new database (#15934)

* Drop default constraint umbracoCacheInstruction table

* Align umbracoContentVersion table

* Update indexes on external login table

* Align node table

* Make relation type index unique

* Remove user-group default constraint

* Re-order methods

* Make webhook url not nullable

* Cleanup

* Cleanup

* Update OpenApi.json

* Update src/Umbraco.Cms.Api.Management/Controllers/UserData/UserDataControllerBase.cs

* Remove tour settings from schema

* Add cancelation tokens

* Dont inject, but take as parameter

* Remove some from injection

* Update schema

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
2024-04-09 11:59:43 +02:00
Kenn Jacobsen
de1fc65393 Swagger: Don't use allOf for inheritance + fix polymorphic models (#15985)
* Swagger: Don't use allOf for inheritance + fix polymorphic models

* Cannot mix $ref and nullable in OpenAPI

* Update OpenApi.json

* Regenerate OpenApi.json
2024-04-09 10:20:20 +02:00
Mole
91085d9b21 Refactor DocumentPresentationFactory to use ITemplateService instead of IFileService (#15995) 2024-04-09 10:18:26 +02:00
Elitsa Marinovska
9c18cd22e0 V14: Deleted code marked as obsolete for V14 (#15998)
* Obsoletions related to Delivery API

* Fix TypeLoader and TypeFinder tests

* Remove obsolete and default implementations of IFileSource and IFileTypeCollection

* More Delivery API related obsoletions

* VariationContextAccessor related

* ValueFactories obsoletion and fix references

* ValueSetBuilders obsoletions

* ValueConverters obsoletions

* Other obsolete ctors and methods

* Forgotten VariationContextAccessor obsoletion

* More obsoletions

* XPath related obsoletions

* Revert XmlHelper changes

* Delete RenamedRootNavigator and its tests

* Fix test

* XmlHelper obsoletion

* Return null instead of GetXPathValue

* Obsolete entire class instead

* Remove XPath obsoletions from IPublishedCache

* Remove XPath-related if-block that is no longer needed

* Change obsolete msg for classes needed for NuCache

* Moving classes to NuCache and making them internal

* Remove more XPath-related obsoletions

* Remove NavigableNavigator and its tests

* Cleanup

* Remove Xpath references from tests

* Revert interface deletion in MediaCache

* Using XOR operation

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>

---------

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
2024-04-09 09:06:48 +02:00
Mole
187d45860a V14: Add cancellation tokens to all endpoints (#15984)
* Add CancellationToken to controllers

* Fix GetManagementApiUrl

* Forgotten Item and Tree controllers

* Document Blueprint and Version endpoints

* Fix merge conflict

* Cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-09 08:18:45 +02:00
Kenn Jacobsen
ddf663d30b Support containers for blueprints (#15983)
* Support containers for blueprints

* Update OpenApi.json

* Fix tree ordering

* Add CancellationToken to new endpoints

* Change to doc blueprint specific things

* Fix policies

* Cleanup

* Use ContentBlueprintEditingService methods instead of underlying ContentService

* Review comments

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-08 14:55:46 +02:00
Elitsa Marinovska
e326370b5f V14: Deleted code marked as obsolete for V12 and V13 (#15999)
* Forgotten v12 obsoletions

* V13 obsoletions

* Remove LegacyStaticServiceProvider and fix using statements of StaticServiceProvider

* Remove obsolete ctors for v13

* More v13 obsoletions

* UmbracoMapper obsoletion

* UmbracoPipelineFilter obsoletion

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-04-08 11:17:32 +02:00
Bjarke Berg
85d35b3a69 Ensure the user is authenticated to see webprofiler/miniprofiler logs (#16007) 2024-04-08 11:14:25 +02:00
Kenn Jacobsen
b552ccb885 Rename Examine based entity search service (#15991)
* Rename Examine based entity search service

* Add a few comments to make it easier to tell the "indexed" search service from the "regular" one.
2024-04-05 17:42:08 +02:00
Sven Geusens
45e584c061 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs

# Ignored Conflicts (Umbraco.Web.UI.Client is completly replaced in v14)
#	src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour/umbtourstep.directive.js
#	src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html
#	src/Umbraco.Web.UI.Client/src/views/components/application/umbtour/umb-tour-step-content.html
#	src/Umbraco.Web.UI.Client/src/views/components/application/umbtour/umb-tour-step-counter.html
#	src/Umbraco.Web.UI.Client/src/views/components/application/umbtour/umb-tour-step-header.html
#	src/Umbraco.Web.UI.Client~HEAD
#	src/Umbraco.Web.UI.Login/package-lock.json
#	src/Umbraco.Web.UI.Login/package.json
2024-04-05 14:14:45 +02:00
Kenn Jacobsen
c6f1189418 Return 404 instead of 500 when an "original parent" has been deleted (#15990) 2024-04-05 12:49:24 +02:00
Bjarke Berg
3cc14888a9 Moved logic from FolderTreeControllerBase service layer (#15976)
* Moved logic from FolderTreeControllerBase into EntityService and EntityRepository

* Custom sorting for data types, not media types

* Ensure ordering is the same for SQLite and SQLServer

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-04-04 11:27:13 +02:00
Sebastiaan Janssen
e993c23d5c Merge branch 'v13/dev' into contrib
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2024-04-04 11:25:13 +02:00
Elitsa Marinovska
43f77eef64 Remove StaticServiceProvider usage (#15978) 2024-04-04 11:25:13 +02:00
dependabot[bot]
71e16d20ef Bump vite from 5.1.1 to 5.1.7 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.1 to 5.1.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.1.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 11:12:22 +02:00
Nhu Dinh
978d191039 Bumped version of test helper (#15981) 2024-04-04 10:58:49 +02:00
Lee Kelleher
ac1ef52aba Download Created Package MIME type (#15982)
Sets the appropriate MIME type of the Created Package download,
this would be either an XML string or a ZIP file. The MIME type will
be used on the client-side to handle the responds accordingly.
2024-04-04 10:37:42 +02:00
Nikolaj Geisle
b5c6a2088f Return null if container type is not found (#15974) 2024-04-04 09:50:31 +02:00
Elitsa Marinovska
be16aa0663 V14: Test new content blueprint editing service (#15970)
* Fix wrong service name

* Move tests to correct place and fix naming

* Introducing a test base

* Tests IContentBlueprintEditingService

* Remove comment

* Adding Assert.Multiple

* More Assert.Multiple + Can_Create_With_Basic_Model() and Cannot_Create_When_Content_Type_Not_Found()
2024-04-04 09:40:06 +02:00
Kenn Jacobsen
70878f501e Make property container type parsing explicit (#15963) 2024-04-04 09:32:24 +02:00
Jacob Overgaard
d74b4d99d1 update backoffice submodule 2024-04-04 09:14:50 +02:00
Kenn Jacobsen
75b1d4729f Examine entity search for documents, media and members (#15972) 2024-04-03 18:49:23 +02:00
Jacob Overgaard
a95a092c39 V14: login screen (#15932)
* remove the temp login screen

* set login build back to esm

* convert razor entrypoint to show new login screen

* enable loading a user defined stylesheet that can be overridden through RCL mechanics

* remove unused file

* for now, remove the call to the old `localizedtext` endpoint until a replacement has been built

* add fallback font

* remove login to the old backoffice

* change models for twoFactorView

* Send view that have to be used for 2fa.

* get 2fa providers from the login call directly

* Return 2fa providers

* map enabledTwoFactorProviderNames to the view

* use correct endpoints for 2fa

* Send link

* change key to id in querystring

* improve localization

* merge authUrl

* Added flow query parameter

* remove unused getter

* remove debug info

* fix fallback value

* fallback value

* Added invite url to email

* Clean up

* Added password configuration to the verify responses, so the client knows, and have confirmed the user is allwed to see it

* allow reset password

* Allow anonymous on invite create password

* open api

* check for invite

* fix fallback text

* validate invite token

* try to extract the problem details object

* add error logging

* fix invite user parameters

* Use correct id for performing user

* Allow password reset on yourself without the old password, if you are currently invited

* hardcode the authorize endpoint url for now

* fix handlers and disable icons for now

* import icons from backoffice client

* add backoffice path to icons

* fix handler for 2fa custom view

* update image temporarily

* remove old icon registry

* convert login components to UmbLitElement

* convert `UmbAuthContext` into a real context with a token

* cleanup dependencies

* optimise vite

* remove lit

* optimise external login component loader

* use generated resources for reset password

* use generated resources for all methods

* import and register the main bundle

* register localization

* change localization keys

* update all localization keys to new format

* replace tokens

* copy code

* added danish translations

* convert to lowercase

* all languages should have same weight

* added german translations

* add missing variable

* missing text

* added dutch translations

* added swedish translations

* added norwegian translations

* add temporary fix so the login app can be built

* make sure BuildLogin is run only after BuildBellissima has been run to ensure the dependencies are present on disk

* run the real login build in pipelines

* set vite language to en-us

* optimise msw warnings

* wait a bit before rendering the form so we know everything has been loaded

* Add external login endpoint + move models around

* Allow FORM submissions to the external login endpoint

* rename `IdentityProvider` back to `Provider` to avoid a breaking change from V13

* type in url for login-external manually (for now) since route attributes are no longer a thing

* move GET back to POST for external forms

* load in public manifests on boot of the login screen

* Clean up

* handle the case where an external login provider has disabled local login and show a message instead of the login form

* remove external login providers from the server login screen

* add more translations

* use the friendly greeting for the error layout

* show login form

* add mock handler for public manifest endpoint

* remove the external login layout

* fix test

* Added generic English localization

as a fallback language.

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2024-04-03 15:45:09 +02:00
Nhu Dinh
be58f3142d V14 QA Fixed/Cleaned up the api acceptance tests (#15964)
* Removed api tests for RelationType since it is impossible to create/update/delete relation type

* Fixed api tests for UserGroup

* Fixed api tests for UserAvatar

* Fixed api tests for User

* Fixed api tests for Temporary File

* Fixed api tests for Dictionary

* Fixed api tests for DataType

* Fixed api tests for DataTypeFolder

* Cleaned up

* Bumped version of test helper

* Update tests/Umbraco.Tests.AcceptanceTest/tests/ApiTesting/Dictionary/Dictionary.spec.ts

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Reversed the api tests for Relation Type

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2024-04-03 12:06:54 +02:00
Bjarke Berg
1437483a68 V14: Add IsAdmin to user and current user response models (#15969)
* Added isAdmin og user response models

* updated factory

* revert line removal

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-04-03 11:08:47 +02:00
Kenn Jacobsen
06cfec25aa Fix swagger schema error after #15946 (#15971) 2024-04-03 10:16:02 +02:00
Chad
682b7656bc Update RefreshMethodType.cs 2024-04-02 21:49:03 +01:00
Elitsa Marinovska
37734efd15 V14: Blueprint CRUD endpoints (#15947)
* Get blueprint by key

* Renaming

* Implementing DeleteBlueprintAsync

* Fixing tests to use the new method

* Making ContentControllerBase abstract

* Cleanup

* Implementing Delete blueprint endpoint

* Revert obsoletion in ContentService.cs

* More reverting

* Remove usings

* Introducing IContentBlueprintEditingService

* Refactor Get and Delete blueprint endpoints to use the new IContentBlueprintEditingService

* Fix base inheritance case in SchemaIdSelector

* Creating RequestModelBase for UpdateDocument to be reused in both document and blueprint models

* Creating DocumentResponseModelBase to be reused in both document and blueprint models

* Renamed blueprint response model for item endpoint to be aligned with the rest of the item models

* More renaming changes of the DocumentBlueprintItemResponseModel

* Refactor ByKeyDocumentBlueprintController to make use of the new blueprint models

* New blueprint models and mapping

* Adding UpdateAsync to ContentBlueprintEditingService

* Adding IDocumentBlueprintEditingPresentationFactory.cs

* Adding UpdateDocumentBlueprintController.cs

* Adding methods required from the base

* Fixing bug in document type mapping - mapping incorrect key

* Cleanup

* Fix item endpoint

* Adding MapCreateModel

* Adding create model

* Creating request model base + related classes

* Another request model

* Blueprint editing service

* Adding create controllers

* Adding DuplicateName operation status for blueprints and handling it

* Updating OpenApi.json

* Fix comment

* Fix mapping

* Adding comments

* Passing in id for create blueprint from document model

* Mapping default state to Draft - no need to calculate it, it will always be that for blueprints

* Cleanup

* Update OpenApi.json

* Review comments

* Fix policies

* More policy updates
2024-04-02 12:53:06 +02:00
Sven Geusens
95849c265b Document version endpoints (#15946)
* Rename/Move/duplicate PaginationService to facilitate conversion closer to the data layer

Duplication is because of internal modifier as we don't want to expose these temporary classes

* Move Guid to Int Extensions into core + add unittests

* Added Document version endpoints

Updated used services to use async methods

* Moved PaginationConverter into core so it can be used by the service layer

* Endpoint structure improvements

* Updating OpenApi.json

* Add greedy constructors for contentService tests

* Namespace changes and naming cleanup

* Update openapispec again...

* Refactor injected services

* PR suggestion updates

- Move endpoints into their own structural section as they are also in a different swagger section
- Naming improvements
- Allign PresentationFactories with similar classes
- Cleanup unused assignments
- Cleanup refactoring comments
- Improve obsoletion remarks

* Cleanup

* ResponseModel improvements

* OpenApi spec update

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-02 12:12:36 +02:00
Kenn Jacobsen
1866b61e12 Use an extension method for fetching a required user in a common way (#15953) 2024-04-02 11:20:05 +02:00
Kenn Jacobsen
96f2b17c5a Entity search - take one (#15951)
* Add entity search endpoints (to be replaced with Examine based ones for content, media and member)

* Update OpenApi.json
2024-04-02 10:40:45 +02:00
Nhu Dinh
892a39d39a V14 QA Fixed the failing tests due to UI changes (#15944)
* Bumped version of test helper

* Changed clickCreateButton to clickCreateLink due to UI changes

* Bumped version of json builder

* Changed delete folder method

* Bumped version of test helper

* Added skip tests since currently only can view relations
2024-04-02 09:39:01 +02:00
Mole
d765e69713 V13: Align database schemas of migrated and new database (#15934)
* Drop default constraint umbracoCacheInstruction table

* Align umbracoContentVersion table

* Update indexes on external login table

* Align node table

* Make relation type index unique

* Remove user-group default constraint

* Re-order methods

* Make webhook url not nullable

* Cleanup

* Cleanup
2024-04-02 08:31:38 +02:00
Jacob Overgaard
b3c25ca477 update backoffice submodule 2024-03-27 17:43:59 +01:00
Sven Geusens
67d80da9ed Merge branch 'v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
#	src/Umbraco.Web.Common/Profiler/WebProfiler.cs
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/src/common/directives/validation/valpropertymsg.directive.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.html
#	src/Umbraco.Web.UI.Client/src/views/content/content.create.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/create.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbBlockGridPropertyEditor.component.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/multiurlpicker/multiurlpicker.html
#	src/Umbraco.Web.UI.Client~HEAD

# Ignored changes
#  https://github.com/umbraco/Umbraco-CMS/pull/14787
#  https://github.com/umbraco/Umbraco-CMS/pull/15853
#  https://github.com/umbraco/Umbraco-CMS/pull/15841
2024-03-27 16:13:09 +01:00
Jacob Overgaard
03044202fa update backoffice submodule 2024-03-27 15:20:40 +01:00
Sven Geusens
43920f9adc Merge branch 'v12/dev' into v13/dev 2024-03-27 15:04:00 +01:00
Sven Geusens
1fdc0e2582 Relations/types mangement api cleanup (#15910)
* Made Relation types read only trough the management api

* Removed path from RelationTypeResponseModel

* Removed RelationTypes tree controllers

* Deleted ByChildRelationController as the usecase has been internalized

* Reworked RelationResponseModel

* Added the ID the toe relation response model

* RelationType.IsDeletable is no longer relevant for the management api

Since types are only managed trough code.

* Removed RelationType create/update leftovers

Brought RelationType responsemodels more in line with similar models
Update openapi spec

* Review improvements

* Renamed controller file to match class name

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: kjac <kja@umbraco.dk>
2024-03-27 10:01:29 +01:00
Sven Geusens
e1ee896556 Refactor Tracked references endpoints (#15933)
* Moved tracked references under their respective sources

Prepped the endpoints to be more inline with how we will optimize in the future

* Fixed some endpoint signature issues and update openapi spec

* Partial Revert "Moved tracked references under their respective sources"

This reverts the submodule update in commit 3819276a74c6ff4d848e27c8a36c0abfc2d28b9d.

* Fix duplicate line

* Rework for polymorphic output

* Improved endpoint naming

* Regenerate OpenApi.json

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: kjac <kja@umbraco.dk>
2024-03-26 14:32:56 +01:00
Ethan Nagano
fdea8c28c8 14744 tour not coded to best practice (#15133)
* Apply focusLockService to TourStepDirective

Apply focusLockService to TourStepDirective in order to ensure that
non-modal page contents are inert and do not interfere with focus on
modal dialog with regards to screen reading technologies.

* Add properties to umb-tour.html.

Add properties to umb-tour html page to ensure that it aligns with modal
dialog best practices.

* Add dialog properties to Umbraco tour .html files.

Add properties relating to dialog and accessibility to the Umbraco tour
.html files, including aria-label, role, and tab index.
2024-03-26 09:39:34 +00:00
Jacob Overgaard
2175d523cc update backoffice submodule 2024-03-26 09:55:04 +01:00
Jacob Overgaard
7cb03c3a71 update backoffice submodule 2024-03-26 09:07:41 +01:00