Commit Graph

220 Commits

Author SHA1 Message Date
Bjarke Berg
ef80e25aa6 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Core/Constants-Configuration.cs
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs
#	src/Umbraco.Core/Factories/IDatabaseSettingsFactory.cs
#	src/Umbraco.Core/Factories/IInstallSettingsFactory.cs
#	src/Umbraco.Core/Factories/IUpgradeSettingsFactory.cs
#	src/Umbraco.Core/Factories/InstallSettingsFactory.cs
#	src/Umbraco.Core/Factories/UpgradeSettingsFactory.cs
#	src/Umbraco.Core/Factories/UserSettingsFactory.cs
#	src/Umbraco.Core/Installer/IInstallStep.cs
#	src/Umbraco.Core/Installer/IUpgradeStep.cs
#	src/Umbraco.Core/Installer/NewInstallStepCollection.cs
#	src/Umbraco.Core/Installer/NewInstallStepCollectionBuilder.cs
#	src/Umbraco.Core/Installer/Steps/FilePermissionsStep.cs
#	src/Umbraco.Core/Installer/Steps/RestartRuntimeStep.cs
#	src/Umbraco.Core/Installer/Steps/TelemetryIdentifierStep.cs
#	src/Umbraco.Core/Installer/UpgradeStepCollection.cs
#	src/Umbraco.Core/Installer/UpgradeStepCollectionBuilder.cs
#	src/Umbraco.Core/Models/Blocks/RichTextBlockLayoutItem.cs
#	src/Umbraco.Core/Models/Blocks/RichTextEditorBlockDataConverter.cs
#	src/Umbraco.Core/Models/Configuration/NewBackOfficeSettings.cs
#	src/Umbraco.Core/Models/Configuration/NewBackOfficeSettingsValidator.cs
#	src/Umbraco.Core/Models/Installer/ConsentLevelModel.cs
#	src/Umbraco.Core/Models/Installer/DatabaseInstallData.cs
#	src/Umbraco.Core/Models/Installer/DatabaseSettingsModel.cs
#	src/Umbraco.Core/Models/Installer/InstallData.cs
#	src/Umbraco.Core/Models/Installer/InstallSettingsModel.cs
#	src/Umbraco.Core/Models/Installer/PasswordSettingsModel.cs
#	src/Umbraco.Core/Models/Installer/UpgradeSettingsModel.cs
#	src/Umbraco.Core/Models/Installer/UserInstallData.cs
#	src/Umbraco.Core/Models/Installer/UserSettingsModel.cs
#	src/Umbraco.Core/Models/OutOfDateType.cs
#	src/Umbraco.Core/PaginationHelper.cs
#	src/Umbraco.Core/Services/Installer/IInstallService.cs
#	src/Umbraco.Core/Services/Installer/IUpgradeService.cs
#	src/Umbraco.Core/Services/Installer/InstallService.cs
#	src/Umbraco.Core/Services/Installer/UpgradeService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/Factories/Installer/DatabaseSettingsFactory.cs
#	src/Umbraco.Infrastructure/Installer/Steps/CreateUserStep.cs
#	src/Umbraco.Infrastructure/Installer/Steps/DatabaseConfigureStep.cs
#	src/Umbraco.Infrastructure/Installer/Steps/DatabaseInstallStep.cs
#	src/Umbraco.Infrastructure/Installer/Steps/DatabaseUpgradeStep.cs
#	src/Umbraco.Infrastructure/Installer/Steps/RegisterInstallCompleteStep.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorValidator.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorValues.cs
#	src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockPropertyValueConverterBase.cs
#	src/Umbraco.Infrastructure/Security/IBackOfficeApplicationManager.cs
#	src/Umbraco.Infrastructure/Services/IIndexingRebuilderService.cs
#	src/Umbraco.Infrastructure/Services/IndexingRebuilderService.cs
#	src/Umbraco.New.Cms.Core/Umbraco.New.Cms.Core.csproj
#	src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj
#	src/Umbraco.New.Cms.Web.Common/Umbraco.New.Cms.Web.Common.csproj
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListPropertyValueConverterTests.cs
#	version.json
2023-11-01 13:50:38 +01:00
Zeegaan
eb355f4ab6 Compare invariant to string instead, as SqlServer rounds DateTime 2023-10-31 12:30:12 +01:00
Bjarke Berg
6658a521b2 Dynamic Root (Alternative to XPath in MNTP) (#15035)
* Temp commit.. Initial work on XPath alternative for dymamically finding start nodes

* First commit that goes all the way from ui to db for NearestAncestorOrSelf

* Added more filters + return null from controller instead of not found

* Bugfix

* rewrite query to make sqlserver happy?

* Added more tests

* clean up initial step

* Added tests and refactor

* Update endpoint to take model instead of json

* pick origin

* Use model for config instead of string

* append add filter button

* fix

* default filter

* rename json fields

* correct field names

* minor corrections

* Renaming..

* Rename endpoint

* initial work for appending query steps

* query steps ui

* more localization

* query step UI

* Use doc type keys instead of alias

* only for Documents

* change to send keys to anyOfDocTypeKeys

* Fix potential bug

* Fix when level is impossible to get

* correct prop to dynamicRoot

* noValidStartNode dialog

* custom query step

* Renaming

* Rollback unintended file change

* Fixed issue if no doc type is chosen

* Remove unintended file changes

* More unintended changes

* Renaming

* Optimizations

- IDE Recommendation for better source
- Renaming for better clarity
- Improving spacing/formatting
- Typo corrections
- Remove warnings concerning IEnumerable

* Fix failed attempt bug

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-10-31 11:38:24 +01:00
Nikolaj Geisle
1b34d33eb7 Webhooks administration from Backoffice (#15050)
* Create webhook models

* Define interfaces for service and repository

* Create Webhook dto and corresponding factory

* implement WebhookRepository.cs

* Remove entity name from models, as that should be resolved in mapping instead

* Add new table to schema creator

* Register repo for DI

* Remove more mentions of entityname

* Refactor repository to guids

* Implement WebhookService

* Use scopes in service

* Start creating tests for service

* Refactor delete to use Id and not entire entity

* Rework Webhooks to be able to have multiple entity keys

* Implement GetAll functionality

* Implement webhook controller

* Imeplement get all events action

* Add equalityComparer deletegate to Webhook

* Add datacontract attirbutes to properties

* Implement backoffice webhooks tree

* Implement first webhooks menu

* Make WebHookController authorized

* Update to have tabs with webhooks and logs

* Enable create overlay

* Push to entityKeys array

* Fix up pagination

* Implement delete functionality

* remove pagination

* add log view

* Fix create to be able to select more than one content type

* implement type name resolving for content

* Refactor to use less duplication

* Implement update functionality in frontend

* Rename database table

* Make multiple events possible

* create new event picker

* Refactor to actually add new database table with proper name

* Make it possible to select multiple events

* Fix updating current items

* Fix up update functionality after db rework

* Add webhook icon

* Switch to match heartcore icons

* Refactor to use bases instead of Enum

* Refactor to make IWebhookEvent to Collection, so it can be injected instead of using reflection

* Fix up frontend to match new models

* Fix integration tests

* Remove obsolete entity key from webhookdto

* Introduce constants instead of hard coded strings

* Start implementation of firing mechanism

* Add new GetByEventName method

* Add 1 to many list on WebhookDto

* Implement new repository pattern

* Implement GetByEventName

* Fix up repository to use all async

* Refactor events to fire

* Refactor WebhookEvents to be more DRY

* Add custom header

* Start implementing log repository

* Implement GetPaged

* Implement WebhookLogService

* Implement GetLogs

* Add url to webhook log

* Implement log overview

* Formatting

* Implement details view

* Refactor to get actual retry count

* Refactor firing to fire only when Enabled

* Add Status code to detailed view

* Add configuration to disable webhooks entirely

* Implement custom headers frontend

* Implement persistence of custom headers

* Refactor retry service to also retry on non success status codes.

* Refactor registration of Webhooks, to also register as NotificationHandler

* Add webhooks migration

* Add key for adding webhook headers

* Fix up test

* Change event icon to flag

* Remember event, when editing what events you have chosen

* Refactor reflection to check if INotificationAsyncHandler instead

* Formatting

* Refactor webhook model to no longer derive from EntityBase

* Rename entityKeys to content keys

* Rename controller to lowercase H

* Add null check before trying to access selectedEvents

* Add configuration for maximum number of retries

* Add index to date

* Add webhook Key to logs

* Check for SchedulingPublisher before sending webhooks

* rename requestObject to payload

* Refactor event to send appropriate payloads

* Refactor logging to happen for every try.

* Order date by descending

* Add todo

* Change firing service to use String not ByteContent

* Update Headers to Interface instead of concrete implementation

* Dont return if a table exists already

* Rename updateModel to webhook

* Annotate WebhookController.cs with PluginController attribute

* Add danish translations

* Do not check if fail

* Dont filter when selecting custom items

* Remove delay from WebhookFiringService

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-10-31 10:06:14 +01:00
Bjarke Berg
49c71b1989 Merge 2023-09-20 14:13:21 +02:00
Bjarke Berg
ed73b82fd0 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	tests/Umbraco.Tests.Integration/NewBackoffice/OpenAPIContractTest.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs
2023-09-20 09:51:56 +02:00
Jacob Overgaard
7bbe994fc9 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/less/components/umb-property-editor.less
2023-09-14 13:20:55 +02:00
Sven Geusens
c8e054baa2 V10/feature/pipeline test filters (#14766)
* Add configuration/code to not run certain tests based on variables/release builds

* Applied longrunning testAttribute to the worst offenders (>200ms on my machine)

* Fix yaml notation

* split up windows/non windows test runs

* Added supression for moved tests

* Fix yaml validation issues

* Change yaml string parameter null value to empty string

* Convert empty strings to whitespace strings

* Rename and cleanup some paramater to better reflect why we use them

* Nightly build test

* Change nightly build authentication type

* template paramater fix

* Update nightly pipeline name

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2023-09-12 14:16:27 +02:00
Bjarke Berg
4f5fc0b8a1 Bulk delete functionality for management api (#14735)
* Bulk delete

* Bulk delete

* Added bulk delete user groups

* Clean

---------

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-08-29 15:51:20 +02:00
Bjarke Berg
b8af4bab7d User forgot password functionality for Management API (#14704)
* Added attribute filter to ensure a request is taking a minimum time to response

* Added functionality to management api to send forgot password emails and verify these + do the actual reset using the token

* Renamed UserKey to UserId and updated OpenApi.json

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

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

* Cleanup

* Renaming param

* Fixing send user username instead of email + wrong EmailTypes

* Fixed issue with forgot password functionality after reusing other functionality

* Rename prop

* Adding docs and renaming param

* Handle password validation return types

* More cleanup

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-08-28 12:14:16 +02: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
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
Bjarke Berg
22b2f79d15 Merge remote-tracking branch 'origin/v12/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderApiExtensions.cs
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
#	src/Umbraco.Web.Common/Profiler/WebProfiler.cs
2023-06-21 09:06:42 +02:00
Mole
446544c045 V12: Add deliver api information to detailed telemetry (#14418)
* Add deliver api information to detailed telemetry

* Update translation
2023-06-20 12:03:46 +02:00
Mole
040bf2c1e3 Replace use of SortedSet with HashSets and ISets (#14353) 2023-06-08 10:30:23 +02:00
Bjarke Berg
c84a3e2fe4 Merge remote-tracking branch 'origin/v12/dev' into release/14.0
# Conflicts:
#	src/Umbraco.Core/Manifest/PackageManifest.cs
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/Manifest/LegacyManifestParser.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/CreatedPackageSchemaRepository.cs
#	src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Telemetry/TelemetryServiceTests.cs
2023-06-08 10:07:29 +02:00
Bjarke Berg
96dc594269 Merge remote-tracking branch 'origin/v11/dev' into release/12.0
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-06-08 08:37:30 +02:00
nikolajlauridsen
537e078d43 Merge branch 'release/12.0' into v12/dev 2023-06-06 13:52:17 +02:00
Bjarke Berg
dbfedf31bd Merge remote-tracking branch 'origin/v12/dev' into v14/dev 2023-05-31 09:46:59 +02:00
Bjarke Berg
82746518d4 Merge remote-tracking branch 'origin/v11/dev' into v12/dev
# Conflicts:
#	tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/IndexTest.cs
#	version.json
2023-05-31 09:11:24 +02:00
Bjarke Berg
2407d42de6 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Constants-Telemetry.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Telemetry/TelemetryServiceTests.cs
2023-05-31 08:48:28 +02:00
Kenn Jacobsen
3b433e6658 Expose "expanding" state in API value conversion (#14312)
* Expose "expanding" state in API value conversion

* Add unit test

* Add non-breaking and obsoletion

* Add compat suppressions
2023-05-31 08:46:30 +02:00
Mole
999a83995e V10: Add external login provider count to detailed telemetry (#14282)
* Add backoffice external login provider count to telemetry

* Update translation

* Fix integration test
2023-05-24 11:48:56 +02:00
Mole
f615e7bcfc Only consider alias duplicate if the key matches (#14169) 2023-05-09 10:46:31 +02:00
Bjarke Berg
5dd945f372 Reintroduced management api after v12 merge 2023-05-09 09:21:16 +02:00
Bjarke Berg
0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00
Bjarke Berg
fff393c9ed Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/ManagementApiComposer.cs
#	src/Umbraco.Core/CompatibilitySuppressions.xml
#	src/Umbraco.Infrastructure/CompatibilitySuppressions.xml
2023-04-19 11:42:01 +02:00
Bjarke Berg
c06e89af64 Content Delivery API (#14051)
* Add the core parts of the headless PoC

* Add Content API project (WIP - loads of TODOs and dupes that need to be fixed!)

* Rename the content API project and namespaces

* Fixed bad merge

* Rename everything "Headless" to "ContentApi" or "Api"

* Refactor Content + Media: Key => Id, Name not nullable

* Make Content API property return value types independent of datatype configuration

* Clean up refactorings

* First stab at an expansion strategy using content picker as example implementation

* Use named JSON options for content API serialization

* Proper inclusion and registration of the content API

* Introduce API media builder

* Make MNTP return API content/media depending on configuration (instead of links) and support output expansion

* Content API: Get by controllers (#13740)

* Adding ContentApiControllerBase

* Adding get by id and url controllers

* Change route of get all test controller

* Rename to ContentApiController

* Refactoring

* Removing test controller

* Content API: Add start-node header value to deal with url collisions (#13746)

* Use start-node header value to deal with url collisions

* Cleanup

* Rename "url" param to "path"

* Adding a start node service to get the start-node header value

* Trim '/' from both beginning and end

* Content API: Support Accept-Language header (#13831)

* Move the content API JSON type resolver to an appropriate namespace

* Add localization based on Accept-Language header

* Content API: Output expansion  (#13848)

* Implement request based output expansion strategy + expansion output cache at property level

* Slighty leaner implementation for default output expansion strategy

* Clarify the code a bit

* Fix bad merge

* Encapsulate content API dependencies in the DI

* Support multi-site and multi-culture routing + a little rename/refactor (#13882)

* Support multi-site and multi-culture routing + a little rename/refactor

* Make the by route controller handle root nodes

* Rename Url to Path in API content output

* Add a few comments for magic route creation

* Rename services from "Default" to "Noop"

* Ensure that Umbraco can boot without adding "AddContentApi()" to ConfigureServices

* Moved incorrectly placed media builder

* Fix API routes (#13915)

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Include umbraco properties (width, height, ...) in the Media Properties collection (#14023)

* Move umbraco properties (width, height, ...) to the Properties collection of the API Media model

* Don't output the umbracoFile property of media items

* Add content type deny list (#14025)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Dedicated property cache level for Content API (#14027)

* Support redirect tracking (#14033)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Handle redirect tracking in the content API

* Include start item routing info for redirects

* Add cultures and their routes to the API output (#14038)

* Create a deny list of content types and utilize it for output generation

* Add unit tests

* Handle redirect tracking in the content API

* Include start item routing info for redirects

* Add culture routes to root output (for HREFLANG support)

* Rename redirect service method to better match its purpose

* Review changes

* Delivery API: Query controller (#14041)

* Initial commit

* Custom ContentAPIFieldDefinitionCollection

* Make index IUmbracoContentIndex

* Add querying for children by parent id (key)

* Add missing interface

* Adding querying endpoint

* Test code

* Compose unpublishedValueSet, so that you get the correct data in the ContentAPI index

* Renaming

* Fix ancestorKeys index values

* Adding IApiQueryExtensionService to be able to query the ContentAPI index in a generic way

* Fix IApiQueryService and clean up QueryContentApiController using it

* Support querying for path

* Fix content API indexing

* Fix default sorting

* Implement concrete QueryOption implementations

* Introduce new ExecuteQuery that uses the Core OptionHandlers

* Implement ExecuteQuery

* Change ExecuteQuery signature and implementation

* Implement demo sorting and fetching

* Add query option handlers and collection builder for them

* Cleanup

* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"

This reverts commit 78e1f748e55383baecd123d06457111e18f13365.

* Revert "Delivery API: Content routing and structure (#13984)"

This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.

* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"

This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.

* Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)"

This reverts commit 78e1f748e55383baecd123d06457111e18f13365.

* Revert "Delivery API: Content routing and structure (#13984)"

This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75.

* Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases"

This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db.

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Test commit

* Refactored interfaces for the query handlers and for the selectors (that will handle the value of the fetch query option)

* Implemented a base class for the query options

* Refactored the names of the selectors and made use of the base class

* Refactored the ApiQueryService

* Refactored the QueryContentApiController.cs

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Fixing merge gone wrong

* Fix multi URL picker value converter trying to access disposed objects in edge cases

* Delivery API: Content routing and structure (#13984)

* Introduce content route instead of content path, rename and rework start item (previously start node) handling

* Strip out start node path in generated route path

* Make the start-item header take precedence over the request domain

* Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)

* Make fetching work with the new setup

* Moving files to dedicated folders

* Removing ? for array

* Rename selector query method

* Implement FilterHandler and some filters

* Implement SortHandler and sort some sorts

* Refactoring

* Adding more fields to index due to querying

* Appending filtering and sorting queries

* Implementing a new ISelectorHandler without Examine types

* Re-implementing the collection to have a dedicated one for the selectors

* Implementing a new IFilterHandler without Examine types & refactoring the filters implementing it

* Adding a new collection dedicated to filters

* Renaming the old collection

* Implementing a new ISortHandler without Examine types & refactoring the sorts implementing it

* Adding a new collection for the sorts & adding all collections to UmbracoBuilder.Collections

* Refactoring the service to use the new collections and types

* Refactoring the fields in ContentApiFieldDefinitionCollection

* Remove nullability in Handlers

* Don't return null for selector

* Add TODO for having the filters support negation

* Changing the SortType to FieldType with our custom types on the SortOption

* Fix AncestorsSelector

* Fix ApiQueryService

* Documentation

* Fix Swagger docs

* Refactor the QueryContentApiController

* Adding handling for the IApiContentResponse in the JsonTypeResolver

* Refactor the service to use a safe fallback value in Examine queries

* Adding Noop for the IApiQueryService

* Cleanup

* Remove comment

* Fix name field for indexing

* Don't inherit QueryOptionBase in filters

* Fix casing for API index constant + swap FIXME with TODO

* Add TODO for handling missing fetch with start-item header

* Rename query handler parameters to not leak source (i.e. query string)

---------

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa <>
Co-authored-by: Zeegaan <nge@umbraco.dk>

* Delivery API: Adding pagination to query endpoint (#14083)

* Adding pagination to query endpoint

* Optimize the paging using Examine directly

* Fix comment

* Remove skip/take code duplication

---------

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

* Add missing CompatibilitySuppressions.xml

* Make Delivery API packable

* Make Api.Common packable

* Renamed extension method and namespace so it is discoverable

* Untangle ApiVersion configuration into api.common, so delivery api do not require the management api to boot.

* configure options in management api

* RTE output as JSON for Content API (#14067)

* Conditionally serve RTE output as JSON instead of HTML

* Fixed merge

* Rename to Delivery API (#14119)

* Rename ContentApi to DeliveryApi

* Rename delivery API index implementation

* Update comments from "Content API" to "Delivery API"

* Rename project from Content to Delivery

* Add dedicated controller base for content delivery API

* Rename delivery API content index to include "content" specifically

* Fix compat suppressions

---------

Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-04-19 11:21:31 +02:00
Mole
21b0a7ffae New Backoffice: Fix feedback to users controller (#14031)
* Add specific not found results

* Add tests for the enable/disable not found tweak

* Cache ids and key in UserIdKeyResolver

* Don't cache null keys

* BackOffice not Backoffice

* Move fetching the user out of the ChangePasswordUsersController

* Move resolving user out of SetAvatar

* Move resolving user out of Update

* Return more specific notfound in bykey

* Use ErrorResult for all endpoints with unknown errors

* Split integration tests

* Add mappers

* Use ?: consistently

* Add reuseable iso code validator

* Validate ISO code

* Update supressions

* Use method from base to get current user key

* Rename ISo to Iso

* Use keys in services instead of user groups + Added a couple of new validations

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-04-04 15:41:12 +02:00
Bjarke Berg
1f83e9ab19 Merge remote-tracking branch 'origin/v12/dev' into v13/dev 2023-03-29 11:08:53 +02:00
Bjarke Berg
61a33c734c Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/Routing/UmbracoRequestPaths.cs
2023-03-29 10:30:16 +02:00
Mole
9b626d02c8 New backoffice: User controller (#13947)
* Add UserResponseModel

* Add factory to created UserResponseModel

* Add GetByKey controller

* Add GetAllUsers endpoint

* User proper response model

* Make naming consistent

* Order by username in GetAll

* Add user filter endpoint

* Fix includer user states

* Remove gravatar from the backend

* Send user avatars in response

* Add create user model

* start working on create

* Validate the create model

* Add authorization to create

* Use UserRepository instead of UserService to ValidateSessíonId

* Create IBackofficeUserStore interface

This is essentially a core-friendly version of the BackOfficeUserStore, additionally it contains basic methods for managing users, I.E. Get users, save users, create users, etc.

* Remove more usages of user service

* Remove usages of IUserService in BackofficeUserStore

* Add documentation

* Fix tests and DI

* add IBackOfficeUserStoreAccessor to resolve it in singleton services

* Resolve circular dependency

* Remove obsolete constructor

* Add core friendly user manager

* Finish createasync in user service

* Add WIP create endpoint

* Save newly creates users user groups

* Use service scope for user service

* Remove now unnecessary accessors

* Add response types

* Add update user endpoint

* Add EmailUserInviteSender

* Add technology free way of creating confirmation token

* Add invite uri provider

* Add invite user to user service

* Add invite user controller

* Add delete endpoint

* Add operation status responses

* Add operation status responses

* Added temporary file uploads including a repository implementation using local temp folder.

* Add Disable users endpoint

* missing files

* Fixed copy paste error

* Fix create users return type

* Updated OpenApi.json

* Updated OpenApi.json

* Handle if created failed in identity

* Add enable user

* Make users plural in enable/disable

We're doing the operation on multiple entities

* Added file extension check

* Add unlock user endpoint

* Clean up. Removed old TemporaryFileService and UploadFileService and updated dictionary items to use this new items

* Clean up

* Add reset password

* Add UpdateUserGroupsOnUsers method

* Add UpdateUserGroups

* Get rid of stream directly on TemporaryFileModel, and use delegate to open stream instead.

* Fix post merge

* Use keys instead of IDs

* Add ClearAvatar endpoint

* Review changes

* Moved models to their own files

* Reverted launch settings

* Move enlist extension to its own namespace

* Create set avatar endpoint

* Add reponse types

* Remove infrastructure extension after merge

* Add Cmapatibility suppressions

* Add test suppression

* Add integration tests

* Fix issue found in tests

* Add invited user to UserInvitationResult

* Add more tests

* Add update tests

* Hide different tests under parent

* Return DuplicatUserName user operation status if username matches an email

* Add update tests

* Change sorted set to HashSet

It doesn't work if it's not IComparable

* Change ID to Key when checking super

* Add get tests

* Add more GetAllTests

* Move tests to the right namespace

* Add filter test

* Fix including disabled users bug found by test

* Add test to ensure invited user state

* Add test case for UserState.All

* Add more filter tests

* Add enable disable tests

* Add resolver for keys and ids

* Replace usages of IUserService with IUserIdKeyResolver

* Add CompatibilitySuppressions

* Add UserIdKeyResolverTests

* Fix UserIdKeyResolver

* Add missing user operation results

* Updates from review

* ID not key

* Post instead of patch

* Use set instead of params for enable/disable

* Don't call to array

* Use sets for usergroup keys and user keys instead

* LanguageIsoCode instead of Language

* Update CompatibilitySuppressions after changin enumerable to set

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: kjac <kja@umbraco.dk>
2023-03-29 08:14:47 +02:00
Sebastiaan Janssen
6bc999bca4 Unit tests need updating now that the WriterId is properly being set after merging #12843
(cherry picked from commit a88d0c0ec9)
2023-03-28 10:28:33 +02:00
Sebastiaan Janssen
a88d0c0ec9 Unit tests need updating now that the WriterId is properly being set after merging #12843 2023-03-27 17:46:13 +02:00
Nikolaj Geisle
93da4371e3 V13: Rework attempt pattern to use userkey (#13964)
* Add default super user key to migrations

* Start refactoring all interfaces signatures with ids

* Refactor datatype service to use userKey pattern instead

* Refactor ContentEditingService to use userkeys

* Refactor services to userKey

* Refactor more services to use userkey instead of id

* Refactor RelationService to use userKeys

* Refactor template service to use keys instead of ids

* Refactor fileservice to use keys instead of ids

* Refactor LocalizationService to use keys instead of ids

* Refactor PackagingService to use keys instead of ids

* Refactor TemplateController to use current user keys

* Refactor DataTypeContainerService.cs

* Refactor DataTypeService to use keys instead of ids

* Fix up tests

* Fix up media editing service to use userkey instead of ID

* Update service ctor to avoid ambigious ctors

* refactor DataTypeService

* Refactor DataTypeService to not have a default value for parentKey

* Apply suggestions from code review

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

* Update comment

* Add suppression file

* Add backoffice CompatibilitySuppressions

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-03-21 12:41:20 +01:00
Kenn Jacobsen
4fb011e0fc Domains and hosts API (#13963)
* API for domains and hostnames incl. unit tests

* Update Open API json

* Update other unit tests to use new domain service methods where applicable

* Fix merge + update models to new naming scheme

* Handle attempts to add the same domain twice + unit tests for duplicate domain handling

* Review fixes
2023-03-15 10:28:23 +01:00
Nikolaj Geisle
27ca36db53 V13: relation type controller (#13856)
* Create RelationTypeControllerBase.cs

* Implement ByKey endpoint

* Move controllers

* Implement ByRelationTypeKeyRelationController

* Refactor relation service to use skip/take in interface

* change httpget

* Implement object types endpoint

* Add ObjectTypeViewModelFactory.cs

* Change signature to IActionResult

* Implement CreateRelationTypeController.cs

* Implement CreateRelationTypeController.cs

* Add optional key parameter to RelationType

* Add optional key to RelationTypeSavingViewModel

* Update ProducsResponseType

* Implement UpdateRelationTypeController

* Update routes

* Implement DeleteRelationTypeController

* Remove key from UpdatingViewmoDel

* Implement UpdatingViewModel factory method

* Update relationType factory

* Fix paging for object types

* Implement CreateAsync

* Update create action to use CreateAsync

* Implement update async

* Add default implementations to avoid breaking changes

* actually use userIds

* Add ProducesResponseType status 400 to endpoints

* Implement new DeleteAsync method

* Update OpenApi.json

* Add mapping to DI

* Update 404 to return proper HTTP status

* Add not found to ByKey action

* Rename viewmodels to request/response

* Update OpenApi.json

* All RelationServiceTests.cs

* Add allowed object types test

* Fix grouping

* Implement AllowedRelationObjectTypesService.cs

* Refactor view model factory to use new service

* Implement non-happy path tests

* Implement allowed child/parent object types

* refactor test to return proper relationTypeOperationStatus

* Add can create relation type with key

* Add Id test

* formatting

* Refactor service to have validation logic in save method

* move object types endpoint to own silo

* Delete unused using

* Update OpenApi.json

* Update OpenApi.json

* Update tests to user proper child/parent

* Implement RelationTypeBaseModel

* Update OpenApi.json

* Use array instead of enumerable

* Rename view model factory to presentation factory

* Rename GetPagedByRelationTypeKey

* Rename IRelationViewModelFactory

* Rename IRelationTypeViewModelFactory

* Update error description

* Update OpenApi.json

* Update OpenApi.json

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2023-03-01 08:51:17 +01:00
Mole
5182f46bdb New Backoffice: User Groups Controller (#13811)
* Add key to UserGroupDto

* Fix renaming table in sqlite

The SqliteSyntaxProvider needed an overload to use the correct query

* Start work on user group GUID migration

* Add key index to UserGroupDto

* Copy over data when migrating sqlite

* Make sqlite column migration work

* 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

* Use unscoped migration for adding GUID to user group

* Make sqlite migration work

It's really not pretty, square peg, round hole.

* Don't re-enable foreign keys

This will happen automatically next time a connection is started.

* Scope database when using SQLServer

* Don't call complete transaction

* Tidy up a couple of comment

* Only allow scoping the database from UnscopedMigrationBase

* Fix comment

* Remove remark in UnscopedMigrationBase as it's no longer true

* Add keys when creating default user groups

* Map database value from DTO to entity

* Fix migration

Rename also renamed the foreign keys, making it not work

* Make migration idempotent

* Fix unit test

* Update CompatibilitySuppressions.xml

* Add GetUserGroupByKey to UserService

* Add ByKey endpoint

* Add UniqueId to AppendGroupBy

Otherwise MSSQL grenades

* Ensure that languages are returned by PerformGetByQuery

* add POC displaying model

* Clean up by key controller

* Add GetAllEndpoint

* Add delete endpoint

* Use GetKey to get GUID from id

Instead of pulling up the entire entity.

* Add UserGroup2Permission table

* Fetch the new permissions when getting user groups

* Dont ToString int to parse it to a short

I'm pretty sure this is some way old migration type code that doesn't make any sense anymore

* Add new relation to GetDeleteClauses

* Persist the permissions

* Split UserGroupViewModel into multiple models

This is to make it possible to make endpoints more rest-ish

* Bootstrap create and update endpoints

* Make GetAllUserGroupController paged

* Add method to create IUserGroup from UserGroupSaveModel

* Add sanity check version of endpoint

* Fix persisting permissions

* Map section aliases to the name the frontend expects

This is a temporary fix till we find out how we really want to handle this

* Fix up post merge

* Make naming more consistent

* Implement initial update endpoint

* Fix media start node

* Clean name for XSS when mapping to IUserGroup

* Use a set instead of a list for permission names

We don't want dupes

* Make permission column nvarchar max

* Add UserGroupOperationStatuses

* Add IUserGroupAuthorizationService

* Add specific user group creation method to user service

* Move validating and authorizing into its own methods

* Add operation result to action result mapping

* Update create controller to use the create method

* Fix create end point

* Comment out getting current user untill we have auth

* Add usergroup service

* Obsolete usergroup things from IUserService

* Add update to UserGroupService interface

* User IUserGroupService in controllers

* User async notifications overloads

* Move authorize user group creation into its own service

* Add AuthorizeUserGroupUpdate method

* Make new service implementations internal and sealed

* Add update user

* Add GetAll to usergroup service

* Remove or obsolete usages of GetAllUserGroups

* Add usergroup service to DI

* Remove usage of GetGroupsByAlias

* Remove usages of GetUserGroupByAlias

* Remove usage of GetUserGroupById

* Add new table when creating a new database

* Implement Delete

* Add skip and take to getall

* Move skip take into the service

* Fixup suggestions in user group service

* Fixup unit tests

* Allow admins to change user groups they're not a part of

* Add CompatibilitySuppressions

* Update openapi

* Uppdate OpenApi.json

again

* Add missing compatibility suppression

* Added missing type info in ProducesResponseTypeAttribute

* Added INamedEntityViewModel and added on the relevant view models

* Fixed bug, resulting in serialization not being the same as swagger reported. Now all types objects implementing an interface, is serialized with the $type property

* updated OpenApi.json

* Added missing title in notfound response

* Typo

* .Result to .GetAwaiter().GetResult()

* Update comment to mention it should be implemented on CurrentUserController

* Validate that start nodes actually exists

* Handle not found consistently

* Use iso codes instead of ids

* Update OpenAPI

* Automatically infer statuscode in problemdetails

* Ensure that the language exists

* Fix usergroup 2 permission index

* Validate that group name and alias is not too long

* Only return status from validation

We're just returning the same usergroups, and this is less boilerplate code

* Handle empty and null group names

* Remove group prefix from statuses

* Add some basic validation tests

* Don't allow updating a usergroup to having a duplicate alias

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-02-16 09:39:17 +01:00
Kenn Jacobsen
8caee5297b Use ISO codes instead of language IDs for fallback languages and translations (#13751)
* Use language ISO code for language fallback instead of language ID

* Remove language and language ID from dictionary item and dictionary item translation

* ADd unit test for dictionary item translation value extension

* Make the internal service implementations sealed

* Rename translation ISO code to be more explicit in its origin (Language)

* Add breaking changes suppression

* Handle save of invalid fallback iso code

* Fixed test

* Only allow non-UserCustomCulture's

* Fixed and added tests

* Rename ISO code validation method

* Fix language telemetry test (create Swedish with the correct ISO code)

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-02-01 09:37:37 +01:00
Kenn Jacobsen
0297152249 Split localization service into dedicated services (#13731)
* Rework language service and API

* Revert unintended commit of Directory.Build.props

* Create OS conditional test for invalid ISO codes

* Reintroduce and obsolete old Delete method on ILocalizationService + make new Delete method delete by ISO code + add obsoletion attrs to service implementation

* Review comments + utilize new Delete method

* Do not allow model reuse when creating a new language

* Fix bad merge

* Split localization service into dedicated services for language and dictionary item handling

* Replaced ILocalizationService usage in management API (as much as can be done for now)

* Ensure we can create dictionary items with explicit keys (but no duplicates)

* Fix culture controller so it works properly with pagination

* Update OpenAPI JSON

* Actually update the language being updated...

* Unit test for invalid ISO now no longer needs to differ between OS :)

* A little bit of code health improvements

* A litte less code duplication

* Remove duplicate validation
2023-01-26 13:34:11 +01:00
Kenn Jacobsen
ff2d90d775 Rework dictionary CRUD operations (#13688)
* Rework dictionary CRUD operations

* Update OpenAPI json

* Move responsibility to localization service, introduce new attempt pattern for create and update operations, update unit tests accordingly

* Fix merge

* Rollback assumption that we can map entities from scratch (entity relations got in the way)

* Update OpenAPI JSON

* Add breakage supressions

* Add compat suppressions for integration test project

* Make dictionary item deletion follow same pattern as create and update

* Review comments + update delete to use new pattern

* Update breakage suppressions to match the new Delete method
2023-01-20 13:40:24 +01:00
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
Jason Elkin
96918a9f1f Improve system information/telemetry (#13159)
* Differentiate between IIS and IIS Express in system information telemetry

* Add runtime mode to system information telemetry
2022-12-02 09:03:23 +01:00
Ronald Barendse
6dc874147f v11: Merge v10/feature/project-cleanup into v11/dev (#13112)
* New backoffice/add system text json configuration attribute (#12998)

* Add SystemTextJsonConfigurationAttribute

* Fix up formatting

* Rename classes for clearer purpose

Co-authored-by: Zeegaan <nge@umbraco.dk>

* UmbracoPath should no longer be configurable (#13032)

* UmbracoPath should no longer be configurable

* Remove UmbracoPath configuration from all tests

* Only contain style instead of full layout (#13033)

* Only contain style instead of full layout (#13033)

* Fix CodeQL duplicate "permissions"  node and reformat

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* Only contain style instead of full layout (#13033)

* Ensure consistent margin on headings in tree root (#12992)

* Ensure consistent margin on headings in tree root (#12992)

(cherry picked from commit 88bfef9e0d)

* Bump version to 10.2.1

* Translate "User permissions for languages" feature to dutch (#12971)

* Translate 'sectionsHelp' to Dutch

* Translate 'selectLanguages' to Dutch

* Transkate 'allowAccessToAllLanguages' to Dutch

* Translate "User permissions for languages" feature to español (#12975)

* Translate 'selectLanguages' to Español

* Translate 'languagesHelp' to español

* Translate 'allowAccessToAllLanguages' to spanish

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043)

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* pass in parameters needed to member service (#13020)

* Missing methods from IMemberService (#13022)

* Add back methods to interface

* Add default implementations to avoid breaking changes

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New endpoint for web profiling dashboard (#13038)

* Endpoint for web profiling dashboard

* Add profiling API contract

* New Backoffice: Published cache controller (#13034)

* Add published cache controller (endpoints for the Published Status dashboard)

* Update OpenAPI contract for published cache endpoints

* Fix OpenApi spec

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Bug fix for datepicker with offset time (#12847)

* https://github.com/umbraco/Umbraco-CMS/issues/12844

* remove "X" from ng-attr

Doing the test I killed the ng-if attr. But forgot it was there doing the commit

Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>

* Make sure swagger tags and operations are sorted alphabetically (#13055)

* Add spellcheck false to password inputs (#13059)

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Fixes #12972 for validating legacy member passwords (#12973)

* Fixes #12972 for validating legacy member passwords

* Removed unused variable

* removed unused variable

* Fix issue toggling boolean between true/false after Save without refreshing

* New backoffice: examine management controller (#12981)

* Add ExamineManagementControllerBase

* Add ExamineIndexModelFactory

* Add IndexesExamineManagementController

* Add proper attributes

* Implement ExamineIndexViewModel.cs

* formatting

* Add comment about it working in .NET 7

* Add SearchersExamineManagementController.cs

* Update comments about why it might throw errors

* Add SearchResultViewModel

* Add SearchExamineManagementController

* Add ExamineSearcherValidationService

* Rename ExamineSearcherValidationService.cs to ExamineSearcherFinderService.cs

* Rename interface aswell

* Add SearchExamineManagementController

* Refactor ExamineSearcherFinderService

* Add HasIndexRebuiltExamineManagementController.cs

* Fix up formatting

* Async actions

* Add RebuildIndexExamineManagementController.cs

* Rename IExamineIndexModelFactory to IExamineIndexViewModelFactory

* Refactor HasIndexRebuilt endpoint to Index endpoint

* Remove unused usings

* Fix up DetailsExplanation

* Create dedicated SearchersViewModel

* Rename action

* Rename RebuildIndex to Rebuild

* Dont have changes in ExamineIndexModel

* Make values strongly typed instead of generic lists of strings

* Rename to non-plural

* Rename to non-plural

* Rename controller

* Introduce ITemporaryIndexingService

* Introduce ITemporaryIndexingService

* Add SearcherName to view model

* Move to new ExamineManagementControllerBase.cs

* Refactor ExamineManagerService

* Use init instead of setters

* Make properties explicitly on models

* Add DI

* Apply suggestions from code review

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

* Rename to IndexExamineManagementController

* Return ViewModel instead of exception

* Make view models non-nullable

* Add examine management extension point

* Rename to IndexingRebuilderService

* Move rebuild logic to service

* Fix up usages in IIndexingRebuilderService

* Fix up DI

* Fix OpenApi contract

* Implement CanRebuild on IIndexingRebuilderService.cs

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

* Update build script

* Add BuildProjectReferences=false to dotnet pack

* Internalize Umbraco.Cms.ManagementApi references

* Make Searchers endpoint return ActionResult (#13068)

* New backoffice - trees design (#12963)

* Refactor: Add default versioned back office route attribute

* Tree controller bases and first draft implementations for document, media and doctype

* Move tree item view models to appropriate location

* Fix missing parent

* Refactor user entity access for testability

* A bit of clean-up + handle user start nodes for items endpoint

* Implement foldersOnly for folder tree

* Items endpoint for document type tree

* Strongly typed action results

* Content + media recycle bin

* Correct return type for swagger

* Member type tree

* Rename user start node handling to make a little more sense

* Revert to faked admin start nodes in document tree

* Media type tree

* Data type tree

* Relation type tree

* Remove unused dependency from member type tree

* Correct documentation for member type tree endpoint response types

* Use icon constants

* Add templates tree

* Member group tree

* Document blueprint tree

* Partial views, scripts and stylesheets trees

* Static files tree

* Clarify "folders only" state

* Comments and improved readability

* Rename TreeControllerBase and TreeItemViewModel

* Move recycle bin controller base to its own namespace

* Moved tree base controllers to their own namespace

* Common base class for tree view models

* Remove ProblemDetails response type declaration from all actions

* Add OpenApiTag

* Various review comments

* Dictionary item tree

* Renamed all tree controllers to follow action/feature naming convention

* Handle client culture state for document tree

* Support "ignore user start nodes" for content and media + refactor how tree states work to make things more explicit

* Fix or postpone a few TODOs

* Make entity service able to paginate trashed children

* Handle sorting explicitly

* Re-apply VersionedApiBackOfficeRoute to install and upgrade controllers after merge

* Use PagedViewModel instead of PagedResult for all trees

* Explain the usage of UmbracoObjectTypes.Unknown

* Introduce and apply GetMany pattern for dictionary items

* Add a note about relation type caching

* Fix broken test build + add unit tests for new localization service methods

* Use new management API controller base

* Entity repository should build document entities for document blueprints when getting paged entities (same as it does when getting specific entities)

* Use Media type for Media recycle bin

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

* Move shared relation service to concrete implementations

* Use inclusive language

* Add 401 response type documentation to applicable trees

* Refactor entity load for folder tree controller base + ensure that folders are only included in the first result page

* Add (in-memory) pagination to dictionary tree

* Make file system controller honor paging parameters

* Support pagination in relation type tree

* Clarify method name a bit for detecting tree root path requests

* Update Open API schema to match new trees

* Move from page number and page size to skip/take (with temporary workaround for lack of property skip/take pagination in current DB implementation)

* Update OpenAPI schema to match skip/take

* Update OpenAPI schema

* Don't return paginated view models from "items" endpoints

* Update OpenApi schema

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

* Use pattern matching to check if items is not `JArray`

* Bump Smidge up to v4.1.1

* Removing X-XSS-Protection healthcheck

* Redirect to a return URL if one is present on the querystring when logging into the back office

* Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions')

* Implement playwright acceptance tests instead of cypress (#13069)

* fix up dependencies in package.json

* Change configs to playwright

* update types

* remove cypress

* add playwright

* Fix up imports

* Move up test files

* Fix up scripts

* Update user import

* Remove allowEditInvariantFromNonDefault=True.spec.ts

* Update docker container

* Run playwright on pipelines

* Install playwright

* change urls

* change to run playwright

* Update reporter

* create .env file when installing

* update pipelines

* Remove @in yml

* Update Yaml script to use New-Item

* Pipe object to Value

* Update yaml to use "" not {}

* Update localhost to proper port

* Push package-lock.json

* include dotenv in package.json

* Add back umbraco.config.ts

* Dont change launchSettings.json

* Fix up pipelines

* Change working directory

* Add logging

* Actually name the file

* Remove .env from path

* Add working directory

* Add working directory to script

* check env content

* Update more working dir

* Try making newline in YAML

* add quotes

* Try multiline infront of script

* Move top statement

* use https

* Update to localhost 44331

* ignore https in config

* Change linux to https

* add timeouts for tests

* Fix up url for linux

* Update docker to use port 44331 -> 5000

* increase timeout

* Update yaml

* Remove Cypress references and fix URL/port mapping

* Update umbraco-linux.docker

* Generate ASP.NET HTTPS development certificate

* Enable HTTPS development certificate in Docker

* Dont run failing tests

* Update HTTPS development certificate generation

* Copy nuget.config to correct location in Docker file

* do not run flaky test

* update outputdir

* Remove flaky tests

* Update to dot reporter

* Update to json-models-builders package

* Check if results folder exists

* Remove logging

* Use bash to find folder

* Dont use junit to report

* only publish if folder exists

* Add 5 retries for CI

* search correct folder

* Remove unused json file

* Use line reporter

* Remove umbraco.config.ts

* Remove more flaky test

* Add waits so we dont bombard SQLite

* Add page as parameter

* add page as parameter

* Remove flaky macro test

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>

* Fix comment of view property in `ConfigurationFieldAttribute` (#13077)

* Fix comment of view property in `ConfigurationFieldAttribute`

* Update description of key property as well

* Use char instead of string for DetectJson (#13019)

* Use char instead of string for DetectJson

* Use faster method

* Change DetectIsJon method

* Update acceptance test readme & scripts (#13078)

* Update readme to reflect the change to playwright

* Update test scripts

* update README

* update pipelines to run new script

* update package.json scripts

* dont include demo test in package.json

* Add creation of blueprint test

* Implement create test script

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Refactor event handler away from keyup to ng-change

* Don't use legacy icon for action delete

* Added nullability attribute to IsNullOrWhitespace

* Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61

* Revert "Removing X-XSS-Protection healthcheck" (#13096)

This reverts commit 696475ebf2.

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: New Api controllers (#12983)

* Create migrate Language controller to Umbraco.Cms:ManagementApi

* Add proper language mapping

* Update mapping to handle if language name is null

* Uncomment code

* Add new language view model

* Add LanguageViewModelMapping

* Add mapper registration

* Fix up AddMappers extension method

* Implement mapping IEnumerable of languages

* Change action signatures to ViewModel instead of model

* Seperate logic from controller into service

* Move LanguageService.cs

* Register service

* Fix up mapping

* Add null check to mapping instead of controller

* Map to ILanguage instead of implementation

* Fix up null check

* Implement ProblemDetailsBuilder.cs

* Rename duplicate method

* Use builder in actions

* Implement new Paged models

* Create language controller base

* Use pagedModel for GetAllLanguages

* Create GetAllLanguagesPaged method

* Split language controller into single APIs

* Fix up controllers with API versions

* Map Total property

* Fix up route and naming for GetLanguageController.cs

* Fix up naming for language controllers

* New folder structure

* Add culture controllers

* Map CultureInfos to paged CultureViewModel

* Remove wierd include in csproj

* Refactor controller to return pagedViewModel instead of dictionary

* Fix up mapping to map single and enumerable

* Register mapping

* Add apiversion to controller

* Add inheritdoc

* Create DictionaryControllerBase.cs

* Add delete controller

* Only use HttpDelete for deletes

* Check also if language exists in service

* Split Save action into Create & Update actions

* Update Http attributes on Create and update controllers

* Proper routing for delete controller

* Add api version

* Make action async

* Implement CreateDictionaryController

* Create DictionaryViewModel.cs

* Use viewmodel instead of values

* Create get by int DictionaryController

* Add view models

* Rename controller

* Rename DictionaryViewModel to DictionaryItemViewModel

* use created instead of ID

* Apply DataContract/Datamember to view model

* change to guid instead of Guid

* Use proper responses instead of return models when creating/updating

* Implement new IDictionaryService

* Implement new MoveController

* Use new service in mapper

* Remove unused method

* Add DictionaryViewModelMapDefinition

* Create MoveOrCopyViewModel

* Proper Http action

* Create UpdateDictionary controller

* Map IDictionaryItem to DictionaryViewModel

* Add JsonPatching

* Add UpdateDictionaryController.cs

* Map DictionaryTranslationsDisplays properly

* ParentId should be nullable

* Add new DictionaryTranslationViewModel.cs

* Remove translationViewModel

* Add Id and Key to DictionaryTranslationDisplay.cs

* Implement IDictionaryFactory.cs

* Create DictionaryViewModels and do not use IEntity

* Map to new view models instead of displays

* Register the factiories in the service container

* Remove newtonsoft

* Add serializing to and from PatchDocs

* Use JsonPatchViewModel instead of object type

* Add JsonPatch.Net to csproj

* Implement JsonPatchService.cs

* Register JsonPatchService

* Make model non-nullable

* Update controllers to use new attributes

* Rename MoveViewModel.cs

* Remove NameIsDirty as that is legacy from how we used to handle updating

* Add GetAllDictionaryController

* Add todo to DictionaryControllerBase

* Add ExportDictionaryController

* Add ImportDictionaryController

* Remove unused umbraco mapper

* Add upload dictionary controller

* Create Dictionary import view models

* Update UploadDictionaryController with view models

* Remove unused using

* Implement pagedviewmodel for GetAllDictionaryController.cs

* Add dictionary overview viewmodels

* Add mapping for DictionaryOverViewModel

* Update Dictionary controller to use new viewmodel

* Fix up attributes for UploadDictionaryController

* Make actions async

* Make controller bases abstract

* Fix after merge

* New backoffice: Analytics controller (#12957)

* Add AnalyticsControllerBase

* Add AnalyticsViewModel

* Add GetAnalyticsController

* Update ViewModel to use System.Text.Json

* Add SetAnalyticsController

* Add AnalyticsLevelViewModel

* Add GetAllAnalyticsController

* Add viewmodel factory

* Register factory for DI

* Use factory for creation of ViewModel

* Fix up AnalyticsLevelViewModel.cs

* Use analyticsLevelViewModel

* Add Enum validation to controller

* Add OpenApi attributes

* Add routing to GetAllAnalyticsController

* Rename IPagedViewModelFactory

* use new renamed PagedViewModelFactory

* Make actions async

* Make controller base abstract

* Fix up after merge

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Help controller (#12958)

* Add HelpControllerBase

* Add HelpPageViewModel

* Add GetHelpController

* Add viewmodel factory

* Register factory for DI

* Use PagedViewModelFactory for controller

* Update baseurl to be nullable

* Rename IPagedViewModelFactory

* Use new renamed IPagedViewModelFactory

* Dont use httpclient as field

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Relation controller (#12961)

* Add relation controller base

* Add commen about auth

* Add GetRelationController

* Use mapping to viewmodel

* Add RelationViewModel

* Add RelationViewModelsMapDefinition.cs

* Add viewmodel factory

* Register factory for DI

* Rename IPagedViewModelFactory

* Add RelationViewModelFactory

* Remove unused service

* Add GetByChildRelationController

* Add relationViewModelFactory to DI

* Add MappingBuilderExtensions

* Add relationViewModelsMapDefinition to DI

* Use PagedViewModel for child relations

* Add CreateMultiple

* Update GetRelationController to use factory instead of direct mapping

* Update GetByChildRelationController to use relationViewModelFactory

* Fix up after merge

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Tracked references controller (#12966)

* Add TrackedReferencesControllerBase.cs

* Add GetTrackedReferencesController

* Add relation model

* Add ITrackedReferencesRepository.cs

* Rename relation to RelationModel

* Add RelationMapDefinition.cs

* Add TrackedReferencesSkipTakeRepository

* Rename RelationModelMapDefinition

* Add new services to DI

* Rename RelationModel to RelationItemModel

* Implement TrackedReferencesSkipTakeService

* Formatting

* Add RelationItemViewModel.cs

* Add mapdefition

* Update TrackedReferencesController to use new PagedViewModel

* Add service to DI

* imlement proper routing

* Add async to GetTrackedReferencesController.cs

* Rename action to get

* Add DescendantTrackedReferencesController

* make filterMustBeIsDependency nullable

* Use count instead of capacity

* Rename controller

* Add MultipleTrackedReferencesController.cs

* Refactor TrackedReferencesService to not return pagedViewModel

* Remove TODO untill consensus on convention

* Formatting

* Delete old duplicate controller

* Fix up naming

* Fix up naming and fixed todo

* Fix up mapdefinition registrations

* Rename controllers

* Fix naming

* Fix nullable tree

* Fix up relation controller & action names

* Fix naming

* Fix up multiple to not be post

* Apply suggestions from code review

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

* Remove [ApiVersion] from each individual controller and added to base instead

* Added missing semi-colon

* Update all "non-async async" endpoints to return Task.FromResult

* Fixed up LanguageViewModels namespace

* Return proper status code

* Update xml documentation

* Rename GetAllCultureController

* Change return type attribute to proper Model

* Change return type attribute to correct model

* Add clarifying comment

* Change return type attribute to proper model

* Rename ById to by key

* Update DictionaryOverviewViewModel to use Key instead of ID

* Implement factory method to create viewModel instead of using services in mapper

* Fix up DictionaryItemViewModel to use Parent GUID instead of ID

* Update return type attribute to correct model

* Update key to actual GUID instead of string

* Update route to not include "delete"

* Remove redundant IActionResult specification

* Update responseType attribute to correct models

* Update OpenApiTag for DictionaryControllerBase

* Update ResponseType attribute to correct models

* update variable name to not be "XD"

* Update ResponseType attribute to correct model

* Update route to not include "update" as it is redundant

* Update produces responsetype attributes to correct models

* Use IJsonSerializer abstraction instead of JsonConvert directly

* Remove unused field

* Change ResponseType attribute to correct model

* change TrackedReferencesSkipTakeService to return pagedModels directly

* Remove duplicate DI

* change to better variable names

* Move RelationItemModel to core

* Remove empty folder

* Remove ITrackedReferencesSkipTakeService and add it to TrackedReferencesService

* remove TrackedReferencesSkipTakeRepository and add to TrackedReferencesRepository.cs

* Fix up TrackedReferencesService to not use SkipTake repository

* Remove AddRepositories from ManagementApiComposer

* Transition to ManagementApiBaseController

* Fixes ResponseType attribute to correct model

* Add loading files to service instead of having logic in controller

* Add todo comment

* Fix up routing for delete language

* Use problem details builder

* Add SystemTextJsonSerializer

* Add SystemTextJsonSerializer

* Remove unused usings

* Remove obsolete MoveDictionaryController

* Remove CreateDate and UpdateDate from DictionaryViewModel

* Change response type to correct model

* Remove PagedViewModelFactory.cs

* Add obsolete message

* Fix installer view models

A setter is required for the modelbinder to be able to do its work

* Update src/Umbraco.Cms.ManagementApi/Controllers/Analytics/SetAnalyticsController.cs

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

* Update ResponseType to correct Model

* Update comment

* Add FileUploadService

* Add DictionaryFactory.cs to handle creation of viewmodel

* Remove unused DI

* Rename actions & controllers to reflect eachother

* Update OpenApi.json

* Add dictionary to openapi

* Update in proper alphabetical order

* Add trackedReferences to openapi

* Fix open api doc

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

* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

* Re-add empty Directory.Build.props to prevent inheritance

* Re-add missing JsonPatch.Net dependency

* Fix merge issues (redundant TargetFramework property and appsettings-schema.json generation)

* Fix and improve OpenAPI test assertion

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Erik-Jan Westendorp <erikjanwestendorp@outlook.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com>
Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk>
Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Busra Sengul <aysebusrasengul@gmail.com>
Co-authored-by: Justin Neville <justin@nevitech.co.uk>
Co-authored-by: Jeavon Leopold <jeavon@crumpled-dog.com>
Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: bakersbakebread <hello@seanthorne.co.uk>
Co-authored-by: Karl Butler <kbutler@carbonsix.digital>
2022-10-05 12:14:43 +02:00
Kenn Jacobsen
a390ad1c3c UmbracoPath should no longer be configurable (#13032)
* UmbracoPath should no longer be configurable

* Remove UmbracoPath configuration from all tests
2022-09-20 13:19:18 +02:00
Sebastiaan Janssen
db5d05d641 Revert files that shouldn't change back in v11 2022-09-19 16:37:24 +02:00
Sebastiaan Janssen
87c06f5f98 Back to 10.2.0-ish 2022-09-19 16:14:16 +02:00
Bjarke Berg
e9f9b8aee1 merge v10 to v11 2022-08-18 14:38:49 +02:00
Mads Rasmussen
31279b96cf Merge branch 'v10/dev' into v10/feature/variant-permissions 2022-08-03 11:22:35 +02:00