Compare commits

...
Author SHA1 Message Date
Niels Lyngsø 011634e9ba Merge branch 'v16/dev' into v16/bugfix/nested-document-types
# Conflicts:
#	src/Umbraco.Core/Services/PublicAccessService.cs
#	src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts
2025-04-14 20:22:37 +02:00
Niels Lyngsø 1afac0c247 Merge remote-tracking branch 'origin/v15/dev' into v16/bugfix/nested-document-types 2025-04-14 20:20:27 +02:00
Andy ButlandandGitHub 76e2103551 Make sure not to early return when verifying ancestor path is published without completing scope (#19029)
* Make sure not to early return when verifying ancestor path is published without completing scope.

* Added comment.
2025-04-14 17:45:57 +02:00
797db55f73 Content client package (#18978)
* scaffold content package

* move content module files

* move content type module files

* update module paths

* fix imports and registration

* import package

* move content collection condition to content module

* align naming

* use consts

* fix imports

* fix import

* change circular threshold

* adjust threshold

* build the correct modules for content package

* Update package-lock.json

* Update index.js

* Update package-lock.json

* Update index.js

* move UmbPropertyStructureWorkspaceContext token and interface

* move UmbWorkspaceContentTypeAliasConditionConfig to content-type module

* fix self import

* fix self imports

* Update content-workspace-context.interface.ts

* remove type from import

* add readOnlyGuard to interface

* remove dependency on content

* move property type module into content package

* update package.json + tsconfig

* import manifests

* move build config

* Update index.js

* lint corrections

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-14 14:25:03 +00:00
Niels LyngsøandGitHub 2031298001 Merge branch 'v15/dev' into v15/bugfix/nested-document-types 2025-04-14 16:01:44 +02:00
Sebastiaan Janssen 449c94f08d Merge branch 'v15/dev' into contrib 2025-04-14 14:22:36 +02:00
83b92666ac Use maximum available value for JSON serialization depth (#19001)
* Use maximum available value for JSON serialization depth.

* Updated unittests with best practices

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-14 13:50:19 +02:00
8604163c91 Fix dropzone style circular imports (#19024)
* implement standalone

* remove unused style export

* Update src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-14 09:22:29 +00:00
Henrik GedionsenandSebastiaan Janssen b7bf30744a Use GetIdsFromPathReversed to avoid allocating the string values of the integers parsed 2025-04-14 11:19:08 +02:00
dependabot[bot]andJacob Overgaard 9e97f6028b Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 11:01:59 +02:00
dependabot[bot]andJacob Overgaard 8ba3a4d926 Bump vite from 6.2.5 to 6.2.6 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.5 to 6.2.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.6/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 10:22:22 +02:00
Jacob OvergaardandGitHub 3939742917 V16: Replace legacy/fetch with @hey-api/client-fetch (#19002)
* feat: adds new backend-api and http-client packages and generates the api with @hey-api/client-fetch

* feat: maps generic T back to promise to avoid usage of 'any'

* feat: sets up baseUrl and auth for the new client

* feat: gets the api base url from server context instead of the http client

* feat: gets the api base url from server context instead of the http client

* feat: allows undefined token for xhr requests

* feat: changes the response object to be either type T directly (to support @hey-api/client-fetch) or the given type if the response does not contain a 'data' object

* revert interface

* feat: creates an api return type to comply with @hey-api/client-fetch

* feat: maps T back to the data model for non-api types

* feat: simplify api response to return the promise you sent to it with an optional error object

* feat: moves http related modules to the core package

* feat: updates the required type of the client for the api interceptors

* docs: removes invalid property

* feat: adds request parameters to documents

* feat: adds request parameters to imaging

* feat: adds return type to item-server-data-source-base

* feat: adds request parameters to webhooks

* feat: adds request parameters to users

* feat: renames all `requestBody` to `body` to conform with new client-fetch

* feat: uses query to take parameters in

* feat: adds data source response to tree types

* feat: adds request parameters to templating

* feat: adds request parameters to templating

* feat: adds request parameters to telemetry

* feat: adds request parameters to tags

* feat: adds request parameters to examine management

* feat: adds request parameters to relations

* feat: adds request parameters to packages

* feat: catches new api errors that are direct problem details objects

* feat: adds default interceptor to handle Umb-Generated-Resource headers

* feat: uses an error interceptor specifically to catch errors to avoid overhead

* feat: adds request parameters to members

* Revert "feat: uses an error interceptor specifically to catch errors to avoid overhead"

This reverts commit 7ffb7b29bf.

* feat: adds request parameters to media

* feat: adds request parameters to log viewer

* feat: adds request parameters to languages

* feat: adds request parameters to health check

* feat: adds request parameters to oembed

* feat: adds request parameters to documents

* feat: adds request parameters to redirect management

* feat: adds request parameters to blueprints

* feat: adds request parameters to dictionary

* feat: adds request parameters to data types

* feat: adds request parameters to temporary file

* feat: instructs delete methods to return an unknown value

* feat: allows default value to be unknown

* feat: adds request parameters to culture

* chore: import path

* feat: adds correct models to mocks

* feat: adds correct models to installer and upgrader

* feat: adds correct models to mocks

* chore: forgot to move ignore line

* chore: ignores generated files in eslint

* chore: removes old generated files

* feat: moves network connection status manager back into the main app to avoid imports from core

* chore: update imports

* feat: generate API for login screen without relying on the backoffice

* feat: uses the generated models on the login screen

* feat: sets 'credentials' to 'include' and adds it back to openapiconfiguration to avoid a breaking change

* adds back in commands moved to a workspace

* chore: vscode workspace settings formatted and useFlatConfig added for better compatibility
2025-04-14 10:21:42 +02:00
684790df70 Chore: Add script to check for "illegal" imports (#18992)
* stop webhook module from importing itself

* wip script to list all module imports from a folder

* Update package.json

* fix ufm

* fix tip tap

* order by name

* fix stylesheet module

* fix self import

* fix self import

* pass folder as a variable

* implement folder variable

* allow to pass module name + prettify log output

* check for imports from core to packages and report error

* add comments

* run as part of test

* Update package.json

* add threshold

* Update index.js

* add report of module self imports

* Update index.js

* Update index.js

* Update src/Umbraco.Web.UI.Client/devops/module-dependencies/index.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove self imports in /extension-api

* fix order

* fix self imports

* fix self import

* fix self imports

* fix self imports

* fix collection self import

* fix self imports

* fix self import

* Update collection-pagination.element.ts

* Update entity-action.extension.ts

* fix self imports

* lower threshold

* fix self imports

* fix self imports

* fix self imports

* fix merge

* fix tree self imports

* Update sort-children-of-modal.element.ts

* Update section.context.ts

* change threshold

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-14 07:55:20 +00:00
Nhu DinhandGitHub 7fe6971a61 V15 Updated acceptance tests for unsupported invariant content item with variant blocks (#18919)
* Updated tests for invariant block grid with variant blocks

* Updated tests for invariant block list with variant blocks

* Updated tests for invariant document with variant blocks

* Bumped version

* Changed npm command

* Updated isValidationMessageVisible

* Fixed name

* Fixed comments

* Reverted npm command
2025-04-12 08:59:31 +00:00
16ee7227ae Feature: Document Property Value Permission (#18997)
* add property visibility state manager

* implement in structure manager

* filter properties based on visibility

* wip document type structure permissions

* rename

* register entity permission for document type property

* add entity permission for media type property

* pass fallback permissions to document granular permissions

* set as preset

* clean up

* wip document type property picker

* add preset value

* Update input-document-type-structure-granular-user-permission.element.ts

* move files

* rename

* Update input-document-value-granular-user-permission.element.ts

* remove temp test

* Update manifests.ts

* remove unused

* Update input-document-value-granular-user-permission.element.ts

* rename see permission + add write permission

* fix missing type

* require property type unique

* add unique to property type

* rename to property type

* map to unique

* deprecate id on property type

* return unique from property picker

* more explicit naming

* use type

* render detail

* Update input-document-value-granular-user-permission.element.ts

* wip modal flow

* clean up

* add headlines

* hide actions

* pass preset value

* add edit permission method

* include property in permission name

* add read and write managers

* implement read and write state managers

* Update content-type-structure-manager.class.ts

* enforce property permissions

* Storage for granular permissions at property type level

* add guards

* make variant property version

* Rename server models to include "property"

* generate server types

* add permissionType to model

* add mappers to user group permission data

* add mapper to current user permission data

* destroy

* clear state

* use permission type for guard check

* add permission type

* require specific permission type

* use correct schema type

* add mappings

* clean up

* log errors

* fix mapping

* null check for icon

* use fallback if there is no forDataModel

* add translations

* sort group alphabetically

* add empty state for no verbs

* organize folders

* always require unique and variant id

* Allow storing empty lists of verbs

* pass variant id to all states

* Remove empty verbs

* add alias to name

* prevent picking the same property type multiple times

* fix lint errors

* fix create state by observing variant options

* move to workspace context

* Update document-property-value-user-permission.workspace-context.ts

* Update content-editor-properties.element.ts

* clean up

* Rename models (last time, promise!)

* Add migration for default document property value permissions

* generate new server models

* update after model changes

* Correct the default permission identifiers

* Add default permissions to newly created DBs

* Add validation and clean-up

* rename to visibility state

* rename to view

* add helpers

* apply to blocks

* Update document-property-value-user-permission.workspace-context.ts

* disable view and write state by default

* add tests for start and stopping a state

* throw errors if adding to a state that is not running

* export consts

* export consts

* fix circular

* fix circular

* set the entity type when setting values

* only apply for block in document values

* split logic

* start states for document blocks

* only apply states when state is running

* Fixed typos in test method names.

* add readonly type

* Enforce: AllowEditInvariantFromNonDefault configuration (#18758)

* add read only state

* handle read only property state in properties element

* prevent editing shared props on non default

* enforce configuration

* clean up

* set variant id

* move to property module

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>

* remove unnecessary messages

* make sure to destroy consumer

* Thoughts as TODO

* use Entry type

* use Entry type

* get rid of things not yet released

* clean up

* use generic methods

* TODO comment

* use generic observable

* catch if not found

* move variant id out of property type

* mega refactor temp commit

* Guard Manager

* set readOnly as a property on property editors

* further rename

* remove property state managers

* revert state manager

* fix sorting rule

* mega rename and correction

* refactor properties elements

* todo note

* clean up

* impl

* mega refactor moving permission guards to workspace

* rename

* type change

* rearrange

* correct import

* fix tests

* correct tests

* reset viewGuards block

* type correction

* refactor read only for user permissions setting

* todo note

* align property element

* await promise

* impl view guard property filtering

* correct const name

* fix fallback user permissions in mock data

* correct property type id mock data

* toggle permissions example

* complex permission

* Move migration to 16.0.

* rename fallBackToDisallowed to fallbackToNotPermitted

* clean up setReadOnlyStateForUserPermission

* capital o

* align read only naming

* rename method

* add js docs

* remove unused

* correct method name

* add js docs

* add js docs

* camel case function

* fix eslint problems

* camelcase const

* align method names

* remove unused

* fix host

* fix spelling mistake

* align naming

* fix spelling mistake

* add alias

* use read only state methods

* camel case function

* correct method name

* add js docs

* camelcase function

* camel case function

* align method names

* change method name wording

* Include document property value permissions in the current user's aggregated permissions.

* use is read only

* delete unused

* fix implementation of AllowEditInvariantFromNonDefault

* don't know what is happening here. Local is it lower on github it is higher

* Update document-workspace.context.ts

* revert to v16 dev

* simplify if statement

* make it explicit that these are ui only permissions

* add action label for read

* remove duplicates

* use read instead of browse

* align description

* use document instead of node

* make the base class abstract

* extend in test

* Update guard.manager.base.test.ts

* fix example

* style adjustment

* group styling

* refactor guard rule resolving

* remove imports

* remove console.log

* improve disconnected context consumer rejection message

* fix publishableVariantsFilter

* Update document-workspace.context.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-11 14:16:59 +02:00
Niels LyngsøandGitHub 9e9c8c986c set working directory (#18995) 2025-04-11 09:09:45 +00:00
Niels LyngsøandGitHub 3210c304fe fix appending to a froozen object (#19003) 2025-04-11 10:33:21 +02:00
Niels LyngsøandGitHub 63f2fabb5f clean up unnessecary redirect code (#19007) 2025-04-11 07:44:39 +00:00
Andy ButlandandGitHub 9ef2b37be4 Ensure dates read from the database are treated as local when constructing entities (#18989)
* Ensure dates read from the database are treated as local when constructing entities.

* Fixed typos in comments.
2025-04-11 09:32:05 +02:00
Nhu DinhandGitHub 516d62a348 V15 Added acceptance tests for the mandatory property editor in a content or a block (#18920)
* Added tests for mandatory checkboxlist in a content

* Added tests for mandatory dropdown in a content

* Added tests for mandatory media picker in a content

* Added tests for mandatory radiobox in a content

* Added tests for block grid with mandatory property editors

* Added tests for block list with mandatory property editors

* Bumped version

* Cleaned up

* Changed npm command

* Fixed comments

* Fixed comments

* Reverted
2025-04-11 03:13:36 +00:00
Andy ButlandandGitHub 21283245f1 Merge pull request #18993 from umbraco/v16/merge-from-15
Merges v15/dev to v16/dev.
2025-04-10 10:28:50 +02:00
Andy Butland b02b201cab Re-applied obsoletions to tracked references repository.
Re-applied modal handling for rollback.
2025-04-10 09:52:48 +02:00
Andy Butland 0c2485adf9 Post-merge fixes. 2025-04-10 07:16:00 +02:00
Andy Butland 1bb2837254 Post-merge fixes. 2025-04-10 07:12:34 +02:00
Andy Butland 0281d800d0 Post-merge fixes. 2025-04-10 07:04:29 +02:00
Andy Butland ecbfc72323 Merge branch 'v15/dev' into v16/merge-from-15
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs
#	src/Umbraco.Core/Persistence/Repositories/ITrackedReferencesRepository.cs
#	src/Umbraco.Core/Services/ContentEditingService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/IContentEditingService.cs
#	src/Umbraco.Core/Services/IDataTypeService.cs
#	src/Umbraco.Core/Services/ITrackedReferencesService.cs
#	src/Umbraco.Core/Services/RelationService.cs
#	src/Umbraco.Core/Services/TrackedReferencesService.cs
#	src/Umbraco.Infrastructure/Examine/Deferred/DeliveryApiContentIndexHandleContentTypeChanges.cs
#	src/Umbraco.Infrastructure/Examine/DeliveryApiIndexingHandler.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs
#	src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts
#	src/Umbraco.Web.UI.Client/src/mocks/data/document/document.db.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/modal-registration/modal-route-registration.controller.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.context.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/route/router-slot.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/model.ts
#	src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/entity-action/rollback.action.ts
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/TemporaryFileServiceTests.cs
2025-04-09 22:45:56 +02:00
Kenn JacobsenandGitHub ff58fbd2b1 Make it possible to disable Examine indexes by composition (#18988) 2025-04-09 18:13:18 +02:00
Jacob OvergaardandGitHub 4778501a6e V16: Installer does not proceed from last step (#18981)
* fix: moves logic from installation step to context in order not to destroy the host for the request

* chore: removes console.warn
2025-04-09 16:40:54 +01:00
Niels Lyngsø ff30b4f686 Merge branch 'contrib' into v15/dev 2025-04-09 16:56:48 +02:00
dependabot[bot]andJacob Overgaard 6bca91a52f Bump koa from 2.15.3 to 2.16.1 in /src/Umbraco.Web.UI.Client
Bumps [koa](https://github.com/koajs/koa) from 2.15.3 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](https://github.com/koajs/koa/compare/2.15.3...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 15:57:36 +02:00
164b80af0e Display content type names on dynamic node query steps (#18742)
* Display content type names on dynamic node query steps.

* Refactored to use `UmbRepositoryItemsManager` observable

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 11:47:25 +00:00
Niels LyngsøandGitHub ba0028c03d Feature: Use uui invalid color (Awaiting new UUI version) (#18273)
* display validation on save + use uui-color-invalid

* update css vars

* use standalone color for property layout

* remove color from label

* fix badge

* fix create button color

* clean up

* correct badge colors
2025-04-09 10:14:26 +00:00
10e56a52f3 V16: Removes TinyMCE (server-side) (#18913)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Remove places where editorUI alias is used

* Remove more tinyMCE stuff

* Make sure that blocks also works

* Reverted files from bad merge

* bring back value converters

* Class name casing

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 10:00:59 +00:00
6f38a57c8a Document permission inheritance in UI (#18935)
* check the full path for permissions

* fix race condition

* wip update permission when variants change

* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* generate server models

* update types

* map data

* add ancestor context

* set ancestors in context

* use ancestor context in tree

* clean up

* provide ancestor context from a collection item

* provide ancestor context from structure context

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.

* add ancestor data to mocks

* set ancestors ids in mocks

* omit ancestors for recycle bin item

* use correct models for document blueprint mock data

* remove constructor

* mock documents for testing

* add user group permission test data

* wip document user permission condition tests

* generate new server models

* update data efter server models update

* clean up

* Update entity-actions-table-column-view.element.ts

* longer time for not found to appear

* use arg

* observe alias

* set new the right place

* remove const

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-09 11:08:28 +02:00
Andy ButlandandGitHub a0e3ca601e Aggregate document permissions for current user in API response (#18721)
* Create integration test verifying existing behaviour.

* Aggregate permissions per document for the current user response.

* Refactoring following Codescene warnings.
2025-04-09 10:57:50 +02:00
1a9d8e3a5d Fixes label of enable/prevent clean up button after update (#18946)
* Update enable cleanup button text on toggle.

* Handle console error visible on cancel of rollback dialog.

* Return value from `umb-rollback-modal`

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-09 08:15:00 +00:00
+8 3bd66b89e1 Merge branch 'v15/dev' into v16/dev (#18971)
* Only prevent the unpublish or delete of a related item when configured to do so if it is related as a child, not as a parent (#18886)

* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.

* Fixed incorect parameter names.

* Fixed failing integration tests.

* Use using variable instead to reduce nesting

* Applied suggestions from code review.

* Used simple using statement throughout RelationService for consistency.

* Applied XML header comments consistently.

---------

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

* Feature: highlight invariant doc with variant blocks is unsupported (#18806)

* mark variant blocks in invariant docs as invalid

* implement RTE Blocks

* Fix pagination for users restricted by start nodes (#18907)

* Fix pagination for users restricted by start nodes

* Default implementation to avoid breakage

* Review comments

* Fix failing test

* Add media start node tests

* Fix issue preventing blueprint derived values from being scaffolded (#18917)

* Fix issue preventing blueprint derived values from being scaffolded.

* fix manipulating frooen array

* compare with variantId as well

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com

* Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848)

* Tiptap RTE: Style Menu extension kind (#18918)

* Adds 'styleMenu' Tiptap toolbar extension kind

* Adds icons for `<h4>` and `<p>` tags

* Adds commands to HTML Global Attributes extension

for setting the `class` and `id` attributes.

* Renamed "default-tiptap-toolbar-element.api.ts" file

The "element" part was confusing.

* Toolbar Menu: uses correct `item` value

* Cascading Menu: adds localization for the label

* Adds `label` attribute to UUI components

for accessibility.

* Toolbar Menu: uses correct `appearance` value

* Removed unrequired `api` from Style Select

* Destructs the `item.data` object

* Ensure has children reflects only items with folder children when folders only are queried. (#18790)

* Ensure has children reflects only items with folder children when folders only are queried.

* Added supression for change to integration test public code.

---------

Co-authored-by: Migaroez <geusens@gmail.com>

* Only apply validation on content update to variant cultures where the editor has permission for the culture (#18778)

* Only apply validation on content update to variant cultures where the editor has permission for the culture.

* Remove inadvertent comment updates.

* Fixed failing integration test.

* Adds ancestor ID details on document tree and collection responses (#18909)

* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.

* Move publish with descendants to a background task with polling (#18497)

* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.

* Endpoints for retrieval of status and result from branch publish operations.

* Poll and retrieve result for publish with descendants.

* Handled issues from testing.

* Rework to single controller for status and result.

* Updated client side sdk.

* OpenApi post dev merge gen

---------

Co-authored-by: Migaroez <geusens@gmail.com>

* Clear roots before rebuilding navigation dictionary (#18766)

* Clear roots before rebuilding navigation dictionary.

* Added tests to verify fix.

* Correct test implementation.

* Convert integration tests with method overloads into test cases.

* Integration test compatibility supressions.

* Fixes save of empty, invariant block list on variant content. (#18932)

* remove unnecessary code (#18927)

* V15/bugfix/fix route issue from 18859 (#18931)

* unique check

* unique for workspace empty path

* more unique routes

* Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Client

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>

* removes autogenerated workflows

* make getHasUnpersistedChanges public (#18929)

* Added management API endpoint, service and repository for retrieval of references from the recycle bin (#18882)

* Added management API endpoint, service and repository for retrieval of references from the recycle bin.

* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unused code.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated management API endpoint and model for data type references to align with that used for documents, media etc. (#18905)

* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* Renamed model and constants from code review feedback.

* Fix typo

* Fix multiple enumeration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>

* Skip lock tests

* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined (#18763)

* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.

* Added tests to verify functionality.

* Added reference to previous PR.

* Referenced second PR.

* Assemble URLs for all cultures, not just the default.

* Revert previous update.

* Display an original URL if we have one.

* Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Client

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Add raw value validation to multiple text strings property editor (#18936)

* Add raw value validation to multiple text strings property editor

* Added additional assert on unit test and comment on validation logic.

* Don't remove items to obtain a valid value

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Integration tests for content publishing with ancestor unpublished (#18941)

* Resolved warnings in test class.

* Refactor regions into partial classes.

* Aligned test names.

* Variable name refactoring.

* Added tests for unpublished paths.

* Adjust tests to verify current behaviour.

* Cleaned up project file.

* fix circular icon import (#18952)

* remove segment toggle for elements (#18949)

* Fix modal route registration circular import (#18953)

* fix modal route registration circular import

* Update modal-route-registration.controller.ts

* V15/fix/18595 (#18925)

* fix for #18595

* updates the en.ts

* Avoid unneeded Dictionary operations (#18890)

* Avoid some heap allocations

* Remove unneeded double seek

* Avoid allocating new empty arrays, reuse existing empty array

* Avoid allocating strings for parsing comma separated int values (#18199)

* Data type References UI: Workspace + Delete (#18914)

* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* generate server models

* add extension slot

* register data type reference info app

* add reference data mappers

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* generate new models

* update models

* register ref item

* remove debugger

* render types

* register member type property type ref

* register media type property type ref

* Renamed model and constants from code review feedback.

* register reference workspace info app kind

* use kind for document references

* use kind for media references

* use kind for member references

* use deleteWithRelation kind when deleting data types

* fix manifest types

* fix types

* Update types.gen.ts

* update code to fit new server models

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Feature: discard changes for block workspace (#18930)

* make getHasUnpersistedChanges public

* Discard changes impl for Block Workspace

* fix 18367 (#18956)

* Merge commit from fork

* Prevent path traveral vulnerability with upload of temporary files.

* Used BadRequest instead of NotFound for invalid file name response.

* V15 QA Fixing the failing media acceptance tests (#18881)

* Fixed the function name due to test helper changes

* Updated assertion steps due to UI changes

* Added more waits

* Bumped version

* Increase timeout

* Reverted

---------

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

* V15 QA added clipboard test for not being able to copy to root when block is not allowed at root (#18937)

* Added clipboard test

* Bumped version

* Updated to use the name

* Run all tests on the pipeline

* Reverted command

* build: adjusts circular ref number to 4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Welander Jensen <64834767+Welander1994@users.noreply.github.com>
Co-authored-by: Henrik <hg@impact.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-04-09 09:58:01 +02:00
76f27726c5 V15: User password resetting notification (#18679)
* Introduce UserPasswordResettingNotification

* Removed changes to IUserService interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-09 09:28:12 +02:00
d9d66465f6 Allow save of empty translations for dictionary items (#18980)
* Allow save of empty translations for dictionary items.

* Updated Open API schema to match request model update

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-04-09 09:19:48 +02:00
Mads RasmussenandGitHub 10a70a8397 Move router-slot exports to @umbraco-cms/backoffice/router (#18962)
* move router-slot files to core/router

* remove external module

* generate tsconfig

* fix imports

* ignore lint errors

* ignore diff package
2025-04-09 08:45:20 +02:00
947afdbc1e Amend root content routing and ensure trailing slashes as configured (#18958)
* Amend root content routing and ensure trailing slashes as configured

* Fix false positives at root + add more tests

* Awaited async method and resolved warning around readonly.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-09 07:46:24 +02:00
Mads RasmussenandGitHub af07c42120 Remove external base64-js module (#18969)
* move base64 folder into openid

* remove from package.json and tsconfig

* import from local module
2025-04-08 12:47:39 +00:00
Lee KelleherandGitHub 134c8006c0 umb-localize encode HTML arguments (#18960)
* Moves `escapeHTML` call from localization controller to `umb-localize` element

* Adds supporting unit-test

* Removed unit-test

as it is now expected that the localization
controller will return literal HTML markup.

* Updated import path

* Removed extra call to `text()`
2025-04-08 12:32:36 +00:00
64e8f34f0f V16: Adds server context to store information about paths (#18967)
* fix: straightens out unnecessary imports of components and re-exports them appropriately

* fix: imports repository from file directly

* feat: introduces a "server" package and moves UmbAppContext logic to UmbServerContext

* feat: updates all cases of `UmbAppContext` -> `UmbServerContext`

* build: adjusts MAX_CIRCULAR_DEPENDENCIES from 6 to 3

* Update src/Umbraco.Web.UI.Client/devops/circular/index.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: removes unused interface

* build: adds server bundle to vite

* build: vite should build index barrel

* build: readjust to 5 to account for previous failed build

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-08 11:20:03 +00:00
Mads RasmussenandGitHub 6aa471479e Internalize uuid package (#18955)
* move uuid to core package package.json

* install

* remove external + generate tsconfig

* import from local node_modules

* temp accept uuid as import
2025-04-08 10:44:10 +00:00
Jacob Overgaard 8178dba674 build: set MAX_CIRCULAR_DEPENDENCIES to 6 2025-04-08 10:16:09 +02:00
Jacob Overgaard 385a8fecba build: adds another fail scenario to the circular checker if it encounters fewer dependencies than anticipated 2025-04-08 10:16:09 +02:00
Jacob Overgaard 84d8736b90 fix: removes circular dependency by stopping module from importing from itself 2025-04-08 10:16:09 +02:00
Jacob OvergaardandGitHub fd1761dcc1 V16: API error interceptor should return early if it will not execute (#18963)
* fix: resolves an unintended circular reference based on files being moved around

introduced in #18939

* fix: improves error handling to return early if interceptor does not catch a 500

* fix: adds try/catch around json parsing
2025-04-08 09:12:52 +01:00
Andreas ZerbstandGitHub 86e7343f99 V15 QA added clipboard test for not being able to copy to root when block is not allowed at root (#18937)
* Added clipboard test

* Bumped version

* Updated to use the name

* Run all tests on the pipeline

* Reverted command
2025-04-08 09:53:07 +02:00
dependabot[bot]andJacob Overgaard 10ecc99d74 Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 09:23:23 +02:00
Jacob Overgaard 6630220961 build: adjust number of max circulars to 7 2025-04-08 09:11:10 +02:00
84d0ae3ea2 V15 QA Fixing the failing media acceptance tests (#18881)
* Fixed the function name due to test helper changes

* Updated assertion steps due to UI changes

* Added more waits

* Bumped version

* Increase timeout

* Reverted

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-04-08 12:41:32 +07:00
Andy Butland aa76f782ef Merge branch 'release/15.3.1' into v15/dev 2025-04-08 07:17:01 +02:00
Andy ButlandandGitHub 06a2a500b3 Merge commit from fork
* Prevent path traveral vulnerability with upload of temporary files.

* Used BadRequest instead of NotFound for invalid file name response.
2025-04-08 05:03:40 +02:00
Jacob OvergaardandGitHub e1f9219b93 V16: Updates openapi-ts client and deprecates tryExecuteAndNotify (#18939)
* build(deps-dev): bump @hey-api/openapi-ts from 0.61.3 to 0.66.1

* docs: adds information on how to configure new fetch-client

* feat: adds preliminary umb-prefixed error types

* fix: uses correct import path

* docs: jsdocs

* feat: optimises error reporting

* feat: maps functions into separate controllers

* feat: adds color to peek notification

* feat: moves the internal api interceptors controller and adds more interceptors

* feat: adds host to params

* feat: marks certain functions as deprecated

* feat: maps api errors to UmbErrors

* chore: removes deprecation console logs

* chore: allows any

* feat: maps xhr errors to umb errors

* feat: adds host to tryExecute

* feat: adjusts deprecation notifices and checks

* chore: adjusts deprecation notices

* chore: add .warn() to deprecation

* feat: updates login app repository

* feat: changes all `tryExecuteAndNotify` calls to `tryExecute`

* feat: copies helper functions to resources package and deprecates in notification package

* chore: removes unused imports

* feat: adds exports

* chore: removes controller that is no longer useful

* feat: marks _peekError as protected

* feat: adds support for error notifications (and to ignore them) and to cancel an ongoing request

* feat: eliminates duplicated logic in xhr controller

* feat: touches only the cloned response to allow interceptors downstream to unwrap the body

* feat: stores the host for async context

* feat: disables automatic notifications for validation data source

* feat: disables notifications where they are otherwise handled or ignored

* feat: removes deprecated code

* feat: eliminates a controller that only had a static method

* docs: adds jsdocs

* docs: adds jsdocs

* docs: adds jsdocs

* feat: returns umb-notifications response without modifying it

* feat: eliminates dependency on generated `ProblemDetails` type

* feat: eliminates dependence on generated `ApiError` type

* feat: eliminates dependence on generated `CancelError` type

* fix: removes dependency on CancelablePromise
2025-04-07 22:54:51 +01:00
Niels LyngsøandGitHub 17a5218a58 fix 18367 (#18956) 2025-04-07 18:45:22 +02:00
Niels LyngsøandGitHub 4c9084238c Feature: discard changes for block workspace (#18930)
* make getHasUnpersistedChanges public

* Discard changes impl for Block Workspace
2025-04-07 18:42:31 +02:00
9c03422222 Data type References UI: Workspace + Delete (#18914)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* generate server models

* add extension slot

* register data type reference info app

* add reference data mappers

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* generate new models

* update models

* register ref item

* remove debugger

* render types

* register member type property type ref

* register media type property type ref

* Renamed model and constants from code review feedback.

* register reference workspace info app kind

* use kind for document references

* use kind for media references

* use kind for member references

* use deleteWithRelation kind when deleting data types

* fix manifest types

* fix types

* Update types.gen.ts

* update code to fit new server models

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-07 16:24:29 +00:00
Sebastiaan Janssen b61b9dbd5e Merge branch 'v15/dev' into contrib 2025-04-07 16:58:22 +02:00
HenrikandGitHub d9a31d337a Avoid allocating strings for parsing comma separated int values (#18199) 2025-04-07 16:56:59 +02:00
Henrik GedionsenandSebastiaan Janssen 822c8374ef Avoid allocating new empty arrays, reuse existing empty array 2025-04-07 16:31:31 +02:00
Henrik GedionsenandSebastiaan Janssen 4239f0fc06 Remove unneeded double seek 2025-04-07 16:24:31 +02:00
Henrik GedionsenandSebastiaan Janssen db43799d0f Avoid some heap allocations 2025-04-07 16:23:45 +02:00
HenrikandGitHub 2723e4f77c Avoid unneeded Dictionary operations (#18890) 2025-04-07 15:02:28 +02:00
Jacob Welander JensenandGitHub f926316751 V15/fix/18595 (#18925)
* fix for #18595

* updates the en.ts
2025-04-07 14:53:01 +02:00
Mads RasmussenandGitHub b991976fd3 Fix modal route registration circular import (#18953)
* fix modal route registration circular import

* Update modal-route-registration.controller.ts
2025-04-07 11:39:09 +00:00
Mads RasmussenandGitHub c0f820a05c remove segment toggle for elements (#18949) 2025-04-07 11:41:27 +02:00
Mads RasmussenandGitHub 6a36a797ad Fix confirm modal circular import (#18951)
* fix circular import for confirm modal

* Update open-modal.controller.ts
2025-04-07 11:40:57 +02:00
Mads RasmussenandGitHub f6d93ef0ba fix circular icon import (#18952) 2025-04-07 11:39:51 +02:00
Andy ButlandandGitHub 3d1e17b07f Integration tests for content publishing with ancestor unpublished (#18941)
* Resolved warnings in test class.

* Refactor regions into partial classes.

* Aligned test names.

* Variable name refactoring.

* Added tests for unpublished paths.

* Adjust tests to verify current behaviour.

* Cleaned up project file.
2025-04-07 10:04:11 +02:00
ae423decc3 Add raw value validation to multiple text strings property editor (#18936)
* Add raw value validation to multiple text strings property editor

* Added additional assert on unit test and comment on validation logic.

* Don't remove items to obtain a valid value

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-04-07 09:40:17 +02:00
dependabot[bot]andJacob Overgaard 1d9a031c1c Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 08:56:42 +02:00
Andy ButlandandGitHub 4078e83634 Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined (#18763)
* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.

* Added tests to verify functionality.

* Added reference to previous PR.

* Referenced second PR.

* Assemble URLs for all cultures, not just the default.

* Revert previous update.

* Display an original URL if we have one.
2025-04-07 08:18:06 +02:00
Nikolaj Geisle 4b016317f9 Skip lock tests 2025-04-04 17:34:08 +02:00
1f4c19d484 Updated management API endpoint and model for data type references to align with that used for documents, media etc. (#18905)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.

* Refactoring.

* Update src/Umbraco.Core/Constants-ReferenceTypes.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed typos.

* Added id to tracked reference content type response.

* Updated OpenApi.json.

* Added missing updates.

* Renamed model and constants from code review feedback.

* Fix typo

* Fix multiple enumeration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-04 15:10:06 +02:00
fd77074d57 Added management API endpoint, service and repository for retrieval of references from the recycle bin (#18882)
* Added management API endpoint, service and repository for retrieval of references from the recycle bin.

* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed unused code.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-04 12:52:39 +00:00
Niels LyngsøandGitHub bf74636f26 make getHasUnpersistedChanges public (#18929) 2025-04-04 12:42:35 +00:00
Jacob Overgaard 1aff4c69f0 Merge remote-tracking branch 'origin/contrib' into v15/dev 2025-04-04 14:21:38 +02:00
Jacob Overgaard c139015019 removes autogenerated workflows 2025-04-04 14:10:45 +02:00
dependabot[bot]andJacob Overgaard 90a34e17ca Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 14:05:44 +02:00
Lee KelleherandGitHub dc87cf800f Reverts removal of RTE Block Type Configuration property-editor (#18933)
I'd accidentally removed this in PR #18889.
Adding it back in to the "block-rte" package.
2025-04-04 14:04:45 +02:00
Niels LyngsøandGitHub 806f10e52a V15/bugfix/fix route issue from 18859 (#18931)
* unique check

* unique for workspace empty path

* more unique routes
2025-04-04 11:20:29 +02:00
Niels LyngsøandGitHub 788e5cd678 remove unnecessary code (#18927) 2025-04-04 11:18:30 +02:00
Andy ButlandandGitHub ebd5fb4d0c Fixes save of empty, invariant block list on variant content. (#18932) 2025-04-04 10:14:24 +02:00
Andy ButlandandGitHub 5f3ce28032 Clear roots before rebuilding navigation dictionary (#18766)
* Clear roots before rebuilding navigation dictionary.

* Added tests to verify fix.

* Correct test implementation.

* Convert integration tests with method overloads into test cases.

* Integration test compatibility supressions.
2025-04-04 09:14:48 +02:00
ad7053af36 Move publish with descendants to a background task with polling (#18497)
* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.

* Endpoints for retrieval of status and result from branch publish operations.

* Poll and retrieve result for publish with descendants.

* Handled issues from testing.

* Rework to single controller for status and result.

* Updated client side sdk.

* OpenApi post dev merge gen

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-04 07:42:26 +02:00
Andy ButlandandGitHub 6247f54976 Adds ancestor ID details on document tree and collection responses (#18909)
* Populate ancestor keys on document tree response items.

* Populate ancestor keys on document collection response items.

* Update OpenApi.json

* Use array of objects rather than Ids for the ancestor collection.

* Update OpenApi.json.
2025-04-04 06:51:29 +02:00
Andy ButlandandGitHub 3e6b9313e5 Only apply validation on content update to variant cultures where the editor has permission for the culture (#18778)
* Only apply validation on content update to variant cultures where the editor has permission for the culture.

* Remove inadvertent comment updates.

* Fixed failing integration test.
2025-04-03 22:09:40 +02:00
7d41791543 Ensure has children reflects only items with folder children when folders only are queried. (#18790)
* Ensure has children reflects only items with folder children when folders only are queried.

* Added supression for change to integration test public code.

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-04-03 21:55:34 +02:00
Niels Lyngsø 157b7d14eb Merge branch 'v15/dev' into contrib 2025-04-03 21:32:22 +02:00
e0341f9d10 V16: Migrate TinyMCE data type configuration to Tiptap (#18843)
* Create new migration

* Migrate UI to tiptap

* remember to overwrite toolbar

* Add setting to disable migration

* Add default extensions when migrating

* Make sure that blocks also works

* Renamed classes to reference TinyMCE migration

* Defaults TinyMCE toolbar mapping to `null`

if we can't map to a known Tiptap toolbar extension (manifest alias),
then it may cause an issue with the toolbar rendering.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-04-03 18:52:30 +00:00
Lee KelleherandGitHub 8754caa06f V16: Stylesheet Create Options (#18911)
* Adds `entityCreateOptionAction` extensions for Stylesheets

* Deprecates `umb-stylesheet-create-options-modal` and token.

* Corrected localization labels

to resolve failing acceptance test.

* Updated @umbraco/playwright-testhelpers to 16.0.0

* Removed redundant RTE Stylesheet acceptance tests
2025-04-03 16:30:21 +00:00
Jacob OvergaardandGitHub 7d7db6bb2b V16: Vite development optimizations (#18915)
* feat: resolve TODO by removing quiet option

* feat: exclude ./src/mocks from production build

* feat: load only msw when running through vite

* feat: optimise load order

* feat: handles mocked logos with virtual path

* feat: loads mocked service worker from virtual path

* feat: loads assets from virtual path

* feat: forces MSW=on for the static build

* build: adds storybook workflow copied over from the old backoffice repository

* build: limits where the build runs

* build: adds workflow to build a static version of the backoffice upon request

* build: excludes the `/umbraco/backoffice/assets` folder from navigation fallback just in case

* build: triggers run when the workflow file itself changes

* build: triggers run when package.json changes

* build: marks the 'contrib' branch as production

* build: activates static builds on preview/* labels

* build: bumps github checkout version

* build: updates key for backoffice web app

* build: updates key for storybook

* build: disables build for release branches to preseve on preview environments
2025-04-03 15:15:04 +01:00
Lee KelleherandGitHub f3658bf356 Tiptap RTE: Style Menu extension kind (#18918)
* Adds 'styleMenu' Tiptap toolbar extension kind

* Adds icons for `<h4>` and `<p>` tags

* Adds commands to HTML Global Attributes extension

for setting the `class` and `id` attributes.

* Renamed "default-tiptap-toolbar-element.api.ts" file

The "element" part was confusing.

* Toolbar Menu: uses correct `item` value

* Cascading Menu: adds localization for the label

* Adds `label` attribute to UUI components

for accessibility.

* Toolbar Menu: uses correct `appearance` value

* Removed unrequired `api` from Style Select

* Destructs the `item.data` object
2025-04-03 11:44:57 +02:00
Andy ButlandandGitHub e4b3104399 Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848) 2025-04-03 10:51:45 +02:00
Jacob Overgaard 9db62a2c0c ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:07:16 +02:00
Jacob Overgaard 3cd6fcfe67 ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:03:45 +02:00
Jacob Overgaard 3b736d8c73 ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
2025-04-03 09:01:41 +02:00
bbfe40d733 Fix issue preventing blueprint derived values from being scaffolded (#18917)
* Fix issue preventing blueprint derived values from being scaffolded.

* fix manipulating frooen array

* compare with variantId as well

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-04-03 06:45:14 +02:00
Lee KelleherandGitHub c3709de1d3 V16: Removes RTE Stylesheets (client-side) (#18908)
* Removed Stylesheet RTE workspace view

* Removed Stylesheet RTE Rule components

* Removed Stylesheet RTE Rule Manager

* Removed Stylesheet RTE localizations

* Removed Stylesheet RTE mock data

* Aligns the Stylesheet code editor height

with the Scripts code editor.
2025-04-02 17:02:46 +02:00
Kenn JacobsenandGitHub 9d30d5b11c Fix pagination for users restricted by start nodes (#18907)
* Fix pagination for users restricted by start nodes

* Default implementation to avoid breakage

* Review comments

* Fix failing test

* Add media start node tests
2025-04-02 09:34:52 +02:00
Niels LyngsøandGitHub 11c19847cf Feature: highlight invariant doc with variant blocks is unsupported (#18806)
* mark variant blocks in invariant docs as invalid

* implement RTE Blocks
2025-04-02 11:25:34 +07:00
7e46a1c148 V16: Removes TinyMCE (client-side) (#18889)
* Removed TinyMCE client-side code

* Replaces "MaxImageSizeConfiguration" with "Integer" property-editor

* Adds "Dimensions" property-editor

Promoted from TinyMCE package code.

* Updated Tiptap property-editor label

to remove the "[Tiptap]" suffix.

* Corrected Tiptap config localization keys

* Removed TinyMCE acceptance test

* Reverted Tiptap property-editor label

to add the "[Tiptap]" suffix back in.

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-04-01 17:00:27 +02:00
8e0912cbf1 Only prevent the unpublish or delete of a related item when configured to do so if it is related as a child, not as a parent (#18886)
* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.

* Fixed incorect parameter names.

* Fixed failing integration tests.

* Use using variable instead to reduce nesting

* Applied suggestions from code review.

* Used simple using statement throughout RelationService for consistency.

* Applied XML header comments consistently.

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-04-01 15:49:49 +02:00
Jacob Overgaard dbd9218c75 Merge branch 'v15/dev' into v16/dev 2025-04-01 14:03:40 +02:00
Jacob OvergaardandGitHub bf89eae07f V15: Block package should not import from itself (#18902)
* fix: avoids circular dependencies by realising the 'block' package was importing from itself

* chore: lowers requirement to 9 after fixes

* chore: removes unused file
2025-04-01 12:02:35 +00:00
Jacob OvergaardandGitHub 19e873c7ad V15: File upload should use better Image & SVG preview (#18900)
* feat: uses `<uui-card-media />` to preview svg's

* fix: svg preview should support potentially very large images

* fix: adds alt attribute

* fix: adds `<uui-card-media />` for image previews as well

* fix: ensures all previews have at least a "title" attribute
2025-04-01 11:13:41 +00:00
Jacob OvergaardandGitHub d4acd53fd5 fix: fixes an issue where the serverUrl was shown twice and changes the component to use <uui-card-media /> instead (#18899) 2025-04-01 11:36:27 +01:00
Sebastiaan Janssen 85fc189ee8 Merge branch 'v15/dev' into contrib 2025-04-01 12:27:28 +02:00
Jeavon LeopoldandSebastiaan Janssen a48a70595a Check for NRT directory when populating LuceneIndexFolder 2025-04-01 11:57:40 +02:00
Sebastiaan Janssen 0f539088fa Amend PR 18741 2025-04-01 11:52:32 +02:00
Warren BuckleyandGitHub 80233a7850 Add in a VSCode .code-worskpace file (#18741) 2025-04-01 11:50:55 +02:00
Markus JohanssonandGitHub 1dd10eabd4 Use StringComparison.Ordinal in hot paths (#18893) 2025-04-01 11:39:22 +02:00
Warren BuckleyandGitHub e7a52de097 Updates telemetry dashboard UI (#18743)
* Update temeltry dashboard UI

* Uses headline prop/attr to set the header
* Uses a normal h3 rather than a h2 with H3 uui css class
* Updates the UUI slider to not show the value of 0,1,2 as not that useful to see when changing the slider

* Updates translation as it had a weirdly places br mid sentance
2025-04-01 11:29:57 +02:00
Jacob Overgaard d1ee95c7b1 Merge branch 'v15/dev' into v16/dev 2025-04-01 10:38:34 +02:00
Jacob Overgaard 40a2d75282 Merge branch 'release/15.3.1' into v15/dev 2025-04-01 10:34:15 +02:00
Jacob Overgaard 7b4bfbb28e Merge branch 'v15/dev' into v16/dev 2025-04-01 10:31:59 +02:00
Sebastiaan Janssen 7fb9df9b19 Merge branch 'v15/dev' into contrib 2025-04-01 10:15:54 +02:00
Andy ButlandandJacob Overgaard 1720692d3d Ensures date comparisons in schedule integration tests are made only on the datetime part to the second (#18894)
* Ensures date comparisons in schedule integration tests are made only on the date part.

* Include time part to the second.

* Ensure Kind is retained when truncating a date.

* Retain Kind for all truncation levels.
2025-04-01 09:45:35 +02:00
Andy ButlandandGitHub b798925ddb Adds webp to mime type map to support preview on upload file property editor. (#18863) 2025-04-01 09:18:31 +02:00
dependabot[bot]andJacob Overgaard f4caabaa98 Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 09:17:56 +02:00
Andy ButlandandGitHub b1dbd80a07 Adds allow-same-origin to preview IFRAME. (#18895) 2025-04-01 09:07:08 +02:00
Andy ButlandandGitHub 882a0427e4 Ensures date comparisons in schedule integration tests are made only on the datetime part to the second (#18894)
* Ensures date comparisons in schedule integration tests are made only on the date part.

* Include time part to the second.

* Ensure Kind is retained when truncating a date.

* Retain Kind for all truncation levels.
2025-04-01 09:06:24 +02:00
d978a10b61 Fix: #18707 (#18859)
* observe condition changes

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.context.ts

* enable extension to be updated by late appended conditions

* update route when routes change

* remove commented code

* Update src/Umbraco.Web.UI.Client/src/libs/extension-api/registry/extension.registry.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update src/Umbraco.Web.UI.Client/src/libs/extension-api/registry/extension.registry.test.ts"

This reverts commit b8d1dd793d.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 20:41:36 +02:00
Niels LyngsøandGitHub 7200b7b623 Bugfix: #18473 (#18765)
* add more icons

* add group id for inspection

* make outline style to make it not look disabled

* ensure that inherited has entries

* ensure current route is updated accordingly

* data marks

* shared across cultures tag

* fix sidebar group headline size
2025-03-31 14:18:47 +00:00
Andy ButlandandGitHub f200da48d8 Revert rather than prevent updates to sensitive properties on members without sensitive data access (#18794)
* Revert rather than prevent updates to sensitive properties on members without sensitive data access.

* Added suppression for integration test updates.
2025-03-31 15:16:41 +02:00
Jacob Overgaard fc815db80b bump version to 15.3.1 2025-03-31 14:48:54 +02:00
c5a3778ce7 Fix issue text overflow when user name is too long (#18587)
* Fix issue text overflow when user name is too long

* add ellipsis at the end of the text

* Bumped version of test helper

* Fixed document type design tab tests due to test helper changes

* Amends based on Niels' feedback

+ other code formatting tweaks.

* chore: remove unknown attribute on uui-tag

* fix: adds fallback text and uses `<umb-localize />` where applicable

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-31 12:41:32 +00:00
Jacob Overgaard 8c1dfe5431 chore: fix lint errors 2025-03-31 14:07:32 +02:00
Jacob Overgaard 4cd43b264d fix: adds localization for "Unnamed" 2025-03-31 14:06:45 +02:00
Niels LyngsøandGitHub 3e835cd949 set circular dependency limit to 9 (#18786) 2025-03-31 13:55:26 +02:00
88b1b9de13 V15: bump @umbraco-ui/uui from 1.12.2 to 1.13.0
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
2025-03-31 13:50:23 +02:00
98e0615338 V15: Revert "Fix: RTE markup props not up to date issue" (#18879)
* Revert "simplifying the use of props (#18430)"

This reverts commit 347e898190.

* do not set value if identical check

cherry-picked from c03a8afab5

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-31 13:13:00 +02:00
00ec63a966 Todo cleanup of abstract service being aware of implementation types (#18832)
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-03-31 09:52:34 +00:00
Nhu DinhandGitHub e18cdab185 V15 QA Added acceptance tests for inline editing mode (#18874)
* Added tests for block list with inline editing mode

* Added tests to create a document type witha block with inline editing mode

* Added tests for block grid inline editing mode

* Bumped version

* Changed npm commands

* Reverted npm command
2025-03-31 09:33:17 +00:00
Lee KelleherandGitHub 19123b4799 Removed deprecated methods from ITwoFactorLoginService (#18880) 2025-03-31 11:03:01 +02:00
26907f202f hotfix: context provider should not destroy instance (#18864)
* do not destroy instance

* Update src/Umbraco.Web.UI.Client/src/libs/context-api/provide/context-provider.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 10:51:45 +02:00
Niels LyngsøandGitHub 3446b77d7d Feature: context consumer auto destroys if no callback + getContext options (#18835)
* consumer destroys when no callback

* getContext can be simplification

* JSDocs

* implement options to skipHost and pass context alias matches
2025-03-31 10:32:36 +02:00
Jacob OvergaardandGitHub 13d95f31f2 test: removes two tests that fails because of a non-fixated runtime (#18876)
i.e. the tests depend on a specific time interval, but the test runner does not guarantee that, and the tests are not strictly necessary anyway
2025-03-31 08:14:50 +00:00
Niels LyngsøandGitHub c422c82f21 await setup method (#18831) 2025-03-31 10:09:10 +02:00
Niels LyngsøandGitHub ae87f9ccd4 Implement context base for a few last contexts (#18865)
* do not destroy instance

* UmbDashboardHealthCheckElement

* correct last contexts to use context-base

* informing user that Umb.Condition.MenuAlias does not work

* parse host to Section Context
2025-03-31 10:02:25 +02:00
Niels LyngsøandGitHub 3359562e32 make the deprecation discoverable from TSC (#18856) 2025-03-31 09:56:42 +02:00
0e3c8dab8f Unpublish Document: Align UX of referenced items with trash and delete (#18860)
* Added member reference type model.

* Updated client-side types and sdk.

* Render member relations on the member info view.

* Add relation type for related member with migration.

* Extend tests for track relations to include member relations.

* Extend tests for relation repository.

* Extend tests for relation service.

* Addressed comments from Copilot review.

* Add relation notification to member deletion.

* Removed unused import.

* Updates from code review.

* make ref element globally available

* align naming

* use new reference list

* add interfaces for config

* export const

* Fixed failing integration tests.

* apply interface

* deprecate interface with wrong name

* fix import

* disable unpublish button when item or descendants are referenced

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-31 09:52:46 +02:00
Lan Nguyen ThuyandJacob Overgaard 4d8406bb64 fix fix select all checkbox in scheduled publishing 2025-03-31 09:24:47 +02:00
dependabot[bot]andJacob Overgaard 2bc549bbc4 Bump vite from 6.2.2 to 6.2.3 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 09:19:08 +02:00
Mads RasmussenandGitHub e8b7d9daee use uui-dialog-layout for all save + publishing dialogs (#18871) 2025-03-31 09:08:07 +02:00
Niels Lyngsø 48ac4b546e enable changing data-path on an existing context 2025-03-28 20:27:26 +01:00
Niels Lyngsø eb5c57fb94 do not destroy instance 2025-03-28 19:45:44 +01:00
468ca9ae94 Member relation tracking (#18852)
* Added member reference type model.

* Updated client-side types and sdk.

* Render member relations on the member info view.

* Add relation type for related member with migration.

* Extend tests for track relations to include member relations.

* Extend tests for relation repository.

* Extend tests for relation service.

* Addressed comments from Copilot review.

* Add relation notification to member deletion.

* Removed unused import.

* Updates from code review.

* export const

* Fixed failing integration tests.

* deprecate interface with wrong name

* fix import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-28 15:34:25 +00:00
Niels Lyngsø 1e5d29e667 Merge remote-tracking branch 'origin/v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Services/ITwoFactorLoginService.cs
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/components/input-dropzone/input-dropzone.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/media/dropzone/dropzone-manager.class.ts
2025-03-28 13:00:56 +01:00
Niels Lyngsø 95cd6797cc Merge branch 'contrib' into v15/dev 2025-03-28 12:57:55 +01:00
Niels LyngsøandGitHub 6f63837dbc make load more 100% wide (#18821) 2025-03-28 11:49:07 +01:00
Andy ButlandandGitHub 6dc4eca607 Fixes null reference exception triggered when configuring to hide disabled users in the backoffice (#18823)
* Fixes null reference exception triggered when configuring to hide disabled users in the backoffice.

* Updated integration test suppressions.
2025-03-28 11:24:52 +01:00
Andy Butland aca908c549 Adds MemberTwoFactorLoginService. (#18810) 2025-03-28 11:20:38 +01:00
Andy ButlandandGitHub 685a05827e Adds MemberTwoFactorLoginService. (#18810) 2025-03-28 11:16:03 +01:00
Mads RasmussenandGitHub 07080604b9 Render Property "vary by segment"-toggle (#18813)
* render toggle for vary by segment

* use property-layout for appearance

* simplify labels

* remove duplicates

* render tag for vary by segment
2025-03-28 08:49:38 +01:00
Lee KelleherandGitHub 85176d1bf6 Fixes localization culture case-sensitive check (#18849)
Fixes #18801.
2025-03-27 15:24:45 +00:00
Jacob OvergaardandGitHub 52bf6bc412 feat: disables the internal dropzone if multiple=false and an upload is in progress (#18847)
you need to clear the files/queue before trying to upload something else, unless multiple=true
2025-03-27 14:20:36 +00:00
Lee KelleherandGitHub 47e09efec6 Fixes Dropdown property-editor validation (#18845) 2025-03-27 12:39:09 +00:00
9761ef899b Populate parent key on move and copy notifications (#18837)
* Populate parent key on move and copy notifications.

* Remove forgotten fixme

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2025-03-27 10:33:01 +00:00
Jacob OvergaardandGitHub 164868f32a V15: Improve the dropzone for Upload Field (#18840)
* feat: maps up the CANCELLED status

* feat: uses the new dropzone input to render the dropzone

* feat: adds support for differing server urls

* chore: avoids a breaking change by storing the temporary file
2025-03-27 10:22:03 +00:00
Jacob OvergaardandGitHub a71ebe1902 V15: Improve the dropzone for Image Cropper (#18838)
* feat: uses the umb-dropzone-input to render the dropzone

* feat: loads in the blob url rather than reading the file into memory AND appends the server url

* chore: lit 3 compat

* feat: uses the umb-dropzone-input to render the dropzone

* Revert "feat: uses the umb-dropzone-input to render the dropzone"

This reverts commit bc1a6ae7df.

* feat: creates an object url directly from the File rather than the Blob

* feat: revokes the file data url from object storage

* feat: revokes object url on disconnect
2025-03-27 10:11:37 +00:00
Niels Lyngsø fdef134c3b lint fixes 2025-03-27 11:08:35 +01:00
Nhu DinhandNiels Lyngsø bcaaf5a1f4 V15 Added acceptance tests for data type default configuration (#18740)
* Added tests for Approved Color default configuration

* Updated tests for Approved Color configuration

* Added tests for ChecklboxList configuration

* Added tests for Data type default configuration - part 1

* Added tests for data type configuration and updated tests due to test helper changes

* Added more steps to verify the default configuration

* Added tests for the default configuration and refactoring code

* Added steps to verify the TinyMCE default configuration

* Bumped version

* Fixed tests due to test helper changes

* Make all Data Type tests run in the pipeline

* Updated assertion steps

* Fixed format

* Bumped version

* Bumped version

* Comment failing tests

* Reverted npm command
2025-03-27 10:58:58 +01:00
Niels LyngsøandNiels Lyngsø d438d79b8c lint corrections (#18833) 2025-03-27 10:58:58 +01:00
0c7202c6d9 Fix bug uploading an image via the Media Picker is no longer automatically selected (#18667)
* Fix bug uploading an image via the Media Picker is no longer automatically selected

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* remove submit modal

* fix: avoids overriding the dropzone manager as that does not work with inheritance

* fix: set disabling of folders correctly

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-27 10:58:58 +01:00
Nhu DinhandNiels Lyngsø 361c9d9f97 V15 QA Added acceptance tests for user group default configuration (#18800)
* Updated userGroup tests due to test helper changes

* Added tests for user group default configuration

* Bumped version

* Fixed due to test helper changes

* Reverted npm command
2025-03-27 10:58:58 +01:00
Mads RasmussenandNiels Lyngsø 678bce697b fix preset logic (#18815) 2025-03-27 10:58:58 +01:00
Kenn JacobsenandNiels Lyngsø b008afbb27 Obsolete a few unused things. (#18814) 2025-03-27 10:58:57 +01:00
Niels LyngsøandNiels Lyngsø 11479b22b3 implement validation context (#18808) 2025-03-27 10:58:57 +01:00
Andy ButlandandNiels Lyngsø 1c6b7698c8 Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-27 10:58:57 +01:00
Sven GeusensandGitHub 8c5fe3d52b removed syslib003 & syslib0051 obsoleted code dependencies (#18827)
Followed guidance in https://learn.microsoft.com/en-us/dotnet/fundamentals/syslib-diagnostics/syslibxxxx
2025-03-27 10:47:07 +01:00
Nhu DinhandGitHub 94f0add4d9 V15 Added acceptance tests for data type default configuration (#18740)
* Added tests for Approved Color default configuration

* Updated tests for Approved Color configuration

* Added tests for ChecklboxList configuration

* Added tests for Data type default configuration - part 1

* Added tests for data type configuration and updated tests due to test helper changes

* Added more steps to verify the default configuration

* Added tests for the default configuration and refactoring code

* Added steps to verify the TinyMCE default configuration

* Bumped version

* Fixed tests due to test helper changes

* Make all Data Type tests run in the pipeline

* Updated assertion steps

* Fixed format

* Bumped version

* Bumped version

* Comment failing tests

* Reverted npm command
2025-03-27 03:42:13 +00:00
Niels LyngsøandGitHub 9c88326681 lint corrections (#18833) 2025-03-26 19:36:17 +01:00
95e89f8481 Avoid a hash key generation and lookup when inserting in the LockingMechanism (#18243)
* Avoid a hash key generation and lookup when inserting in the LockingMechanism

* Added comments for CollectionsMarshal.GetValueRefOrAddDefault

* Added further comments and tests.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-26 16:55:03 +01:00
b25bcdc436 Fix bug uploading an image via the Media Picker is no longer automatically selected (#18667)
* Fix bug uploading an image via the Media Picker is no longer automatically selected

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* remove submit modal

* fix: avoids overriding the dropzone manager as that does not work with inheritance

* fix: set disabling of folders correctly

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-26 15:04:19 +00:00
028da4545e Reduce CPU time when initiating RepositoryCacheKeys (#18267)
* Avoid an unneeded lookups in the Keys dictionary when initiating key cache

* Add further comments and unit tests around updated code.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-26 16:01:53 +01:00
kjac 04b44af3f9 Only return the direct compositions of a content type - not its ancestor compositions. Effectively a revert of #15800 2025-03-26 15:04:30 +01:00
kjac 74b1f42909 Do not reject existing compositions when updating content types 2025-03-26 14:46:38 +01:00
Kenn JacobsenandGitHub 37035e6e7f Clean up leftover block item data when changing element variance (#18804) 2025-03-26 11:27:23 +01:00
Nhu DinhandGitHub f8c35bb7e9 V15 QA Added acceptance tests for user group default configuration (#18800)
* Updated userGroup tests due to test helper changes

* Added tests for user group default configuration

* Bumped version

* Fixed due to test helper changes

* Reverted npm command
2025-03-26 09:55:22 +00:00
Mads RasmussenandGitHub 056434fa27 fix preset logic (#18815) 2025-03-26 10:32:57 +01:00
Kenn JacobsenandGitHub e32eb06ddf Obsolete a few unused things. (#18814) 2025-03-26 10:24:09 +01:00
Niels LyngsøandGitHub 76dd141d86 implement validation context (#18808) 2025-03-26 10:12:25 +01:00
Mads RasmussenandGitHub 26d66a815a Move public access files to member-public-access module (#18793)
* move to member package

* fix imports

* add module to build

* split types and consts

* export types

* add export type

* add import type
2025-03-26 08:26:18 +00:00
dependabot[bot]andJacob Overgaard 54601d42e2 Bump vite from 6.2.2 to 6.2.3 in /src/Umbraco.Web.UI.Login
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.3/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-26 09:25:04 +01:00
Niels LyngsøandGitHub d93b0002ba avoid destroying before promise has resolved. (#18811) 2025-03-26 09:25:04 +01:00
Kenn JacobsenandGitHub 064c85f47a Merge branch 'v15/dev' into v15/bugfix/nested-document-types 2025-03-26 09:00:31 +01:00
Niels Lyngsø 12f4c17f85 fix failing e2e test 2025-03-26 08:46:43 +01:00
Niels Lyngsø fd4585fba7 fix ts merge conflict 2025-03-26 08:24:52 +01:00
Andy Butland 619e025e7a Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-26 08:00:24 +01:00
Andy ButlandandGitHub 609e9f43e1 Fixed issue where siblings of type at route are omitted from the result. (#18796) 2025-03-26 07:37:04 +01:00
Andy Butland 7dc9cbd9b1 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Factories/RelationTypePresentationFactory.cs
#	src/Umbraco.Core/Services/PropertyValidationService.cs
#	src/Umbraco.Web.UI.Client/utils/all-umb-consts/imports.ts
2025-03-25 17:56:50 +01:00
Mathias HelsengrenandGitHub ccc70fc786 Changes for the debug tag that makes it look better in dark mode (#18791) 2025-03-25 17:28:53 +01:00
Mathias HelsengrenandGitHub b5bffdfada Adjusting some of the colors for the dark theme so the ui looks a bit better when using dark theme (#18792) 2025-03-25 17:28:24 +01:00
Niels LyngsøandGitHub 0dd4443b75 Feature: validation synchronization as opt in (#18798)
* allow for this word

* getMessages

* split inherit and sync method

* sync feature

* rename sync report

* auto report + impl

* remove log

* double inheritance test

* one more test
2025-03-25 15:48:07 +01:00
Jacob OvergaardandGitHub 10f37494b6 V15: umb-dropzone extends umb-input-dropzone (#18784)
* feat: umb-dropzone should extend umb-input-dropzone

moves the umb-dropzone back into the media package and extends the umb-input-dropzone for common logic

* feat: adds a UmbDropzoneMediaManager class to handle media specifically

* chore: sort imports

* feat: adds a browse() method

* removes unused export

* use correct import

* fix: document and media type import should use other dropzone

* docs(storybook): remove old argument

* feat: adds umb-dropzone-media element and deprecates umb-dropzone element

* feat: use umb-dropzone-media instead

* adds export for dropzone

* feat: adds a slot to show an additional text above the dropzone graphics

* feat: the dropzone should fill out its host component

* feat: adds back a text to describe where to drop files

* remove unused import

* fix: removes overflow to allow full border
2025-03-25 14:09:41 +00:00
Kenn JacobsenandGitHub 2711ac07ac Only validate invariant properties when strictly necessary (#18729) 2025-03-25 12:58:01 +01:00
Lee KelleherandGitHub 80e092069b Tiptap RTE: Statusbar extension type (#18789) 2025-03-25 12:52:27 +01:00
Sebastiaan Janssen c23e2eb6f2 Merge branch 'v15/dev' into contrib 2025-03-25 10:44:16 +01:00
Mads RasmussenandGitHub f5c307b8f1 remove duplicate keys (#18787) 2025-03-25 09:41:50 +01:00
0b0a2dc251 Added v16 to run at midnight (#18785)
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
2025-03-25 11:06:33 +07:00
Niels LyngsøandGitHub 780f16e79b UX: Make discard changes button red (#18767)
* make discard button red

* change headline
2025-03-24 22:10:57 +01:00
Mads RasmussenandJacob Overgaard 25837e66fc fix dropzone circular 2025-03-24 16:35:41 +01:00
Mads Rasmussen 3be766fe2a fix build 2025-03-24 16:04:44 +01:00
Mads RasmussenandGitHub 34649db5c9 Block Grid: Fix circular dependencies (#18782)
* Update input-rich-media.element.ts

* fix circular

* fixes circular dependencies in the validation module

* Update bind-to-validation.lit-directive.ts

* fix workspace circular

* Update error-viewer-modal.token.ts

* move contexts next to component

* fix import errors

* import local components from one file

* lint

* import in property editor file

* fix import

* remove duplicate import
2025-03-24 14:46:34 +00:00
4c679a5f4c Update input-rich-media.element.ts (#18772)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-24 14:10:13 +00:00
Niels LyngsøandGitHub 0331cd154b Update 01_bug_report.yml (#18513) 2025-03-24 14:59:10 +01:00
36c66177fc Feature: Tree expansion state (#18227)
* implement tree expansion logic

* wip test example

* support complex expansion

* extend entity

* extend with model

* Update tree-item-context.interface.ts

* use expansion model to observe open state

* clean up

* fall back to tree context

* Update default-tree.context.ts

* Update default-tree.context.ts

* Update default-tree.context.ts

* clean up

* simplify model and state

* refactor to manager

* remove test data

* Update default-tree.context.ts

* rename

* add get method

* rename to collapse

* all collapse all method

* fix collapse logic

* add js docs

* add tests for expansion manager

* do not load children if the item is already open

* Update tree-item-element-base.ts

* config to expand tree root in pickers

* expand tree root for duplicate to

* Update tree-expansion-manager.test.ts

* make methods async

* use array state

* add isExpanded helper

* refactor to use isExpanded helper

* fix type issues

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-24 14:49:09 +01:00
Mads RasmussenandGitHub ad443c7b13 fix circular (#18773) 2025-03-24 14:47:04 +01:00
Mads RasmussenandGitHub 0b6fe91fd3 Validation: Fixes circular dependencies in the validation module (#18774)
* fixes circular dependencies in the validation module

* Update bind-to-validation.lit-directive.ts
2025-03-24 14:39:18 +01:00
Mads RasmussenandGitHub ee496d2730 fix workspace circular (#18775) 2025-03-24 14:32:00 +01:00
Mads RasmussenandGitHub 384b9bdb65 Update error-viewer-modal.token.ts (#18776) 2025-03-24 14:31:40 +01:00
Jacob OvergaardandGitHub 63113c4552 V15: New dropzone component available for the Backoffice (#18753)
* create a symlink between local Client .vscode snippets and global snippets for ease of use

* fix: no need to specify `Element` in the snippet as that is pulled from the filename

Because of our convention with `x.element.ts` you would have ended up with `UmbXElementElement`

* feat: adds new component `umb-input-dropzone`

* docs(storybook): more stories

* feat: construct the temporary files centrally along with an `AbortController` and use its signal

* feat: makes UmbInputDropzone form aware

* feat: introduces a change event

* chore: temporary changes before changing upload field

* feat: adds default slot

* docs: adds jsdocs

* feat: adds more properties

* feat: adds dashed styling

* feat: adds multiple support

* feat: allows to cancel file

* feat: separate **cancel** and **remove**

* fix stylibg

* move dropzone element

* move input-dropzone into dropzone package

* feat: introduces a 'dropzone' package

* import for backward compatibility

* remove ambigious export

* reexport everything from dropzone

* fix import

* cleanup test files

* use correct import paths

* test: make sure folder exists before writing to it

* adds export for modals

* adds entrypoint for dropzone package

* use the AbortController directly on the temporary file object

* uses correct icon name

* feat: adds ability to remove all files and cancel the request

* feat: adds styling for the uploader

and enables it to work in multiple mode with classes over id's

* do not let the content exceed its boundaries

* feat: formats progress with 2 decimals

* feat: formats with 0 decimals

* fix: returns cancel error

* fix: maps cancel errors back to the uploadable item

* fix: do not proceed with media items if the request was cancelled

* chore: mark exports from media <- dropzone as deprecated

* fix: use correct attribute and remove a todo with localizations

* fix: use correct attribute and remove a todo with localizations

* fix: allow to specify parent through attribute

* feat: align attribute `disableFolderUpload` between dropzone components
2025-03-24 13:17:48 +00:00
Andy ButlandandGitHub fdea721a8e Move registration of delivery API component to infrastructure to resolve issue resolve it from controller. (#18777) 2025-03-24 13:25:06 +01:00
Sven GeusensandGitHub 39cad5b2ea Add variancy information to reference response model (#18645)
* Made variant info available on DocumentReferenceResponseModel

* Fix scope issue

* PR Feedback + correct scoping
2025-03-24 12:10:30 +01:00
Andy ButlandandGitHub 30633fe728 Only validate for duplicate member email address when configured to do so (#18747)
* Only validate for duplicate member email address when configured to do so.

* Lookup member after creation by user name rather than email, as only the former is guaranteed to be unique.
2025-03-24 12:02:50 +01:00
Niels Lyngsø 2fe83b5637 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Web/ICookieManager.cs
2025-03-21 19:42:15 +01:00
Lee KelleherandGitHub 9ee31367df V16: Removed deprecated client-side code (#18662)
* Removed duplicated "document-is-not-trashed.condition" code

* Removed deprecated code, marked for removal in Umbraco 15

(that we forgot about)

* Removed deprecated code, marked for removal in Umbraco 16

* Regenerated constants

* Reverted deletion
2025-03-21 18:56:52 +01:00
Andy ButlandandGitHub 825f791d01 Remove the non-controversial, straightforward obsoleted constructs for Umbraco 16 (#18661)
* Removed obsoletes from IConfigManipulator.

* Removed obsolete models builder extensions.

* Removed the obsolete ContentDashboardSettings.

* Removed the obsolete InstallMissingDatabase setting on GlobalSettings.

* Removed obsolete NuCache settings.

* Removed obsolete RuntimeMinificationSettings.

* Removed obsolete health check constant.

* Removed obsolete icon constant.

* Removed obsolete telemetry constant.

* Removed obsolete property and constructor on UmbracoBuilder.

* Removed obsolete constructor on AuditNotificationsHandler.

* Removed obsolete constructor on HTTP header health checks.

* Removed obsolete constructor on MediaFileManager.

* Removed obsolete GetDefaultFileContent on ViewHelper.

* Remove obsoleted methods on embed providers.

* Fix tests.

* Removed obsolete constructors on BlockEditorDataConverter.

* Removed obsolete SeedCacheDuration property on CacheSettings.

* Removed obsolete PublishCulture on ContentRepositoryExtensions.

* Removed obsolete MonitorLock.

* Removed obsolete synchronous HasSavedValues from IDataTypeUsageService and IDataTypeUsageRepository.

* Removed obsolete HasSavedPropertyValues from IPropertyTypeUsageService and IPropertyTypeUsageRepository.

* Removed obsolete methods in ITrackedReferencesService and ITrackedReferencesRepository.

* Removed obsolete DateValueEditor constructors.

* Removed obsolete GetAutomaticRelationTypesAliases.

* Removed obsolete constructor on TextOnlyValueEditor.

* Removed obsolete constructors on RegexValidator and RequiredValidator.

* Removed obsolete constructs on SliderValueConverter and TagsValueConverter.

* Removed obsolete GetContentType methods from IPublishedCache.

* Removed ContentFinderByIdPath.

* Removed obsolete constructor on DefaultMediaUrlProvider.

* Removed obsolete constructor on Domain.

* Removed obsolete constructor on PublishedRequest.

* Removed obsolete methods on CheckPermissions.

* Removed obsolete GetUserId from IBackOfficeSecurity.

* Removed obsolete methods on LegacyPasswordSecurity.

* Removed obsolete constructors on AuditService.

* Removed obsolete methods on IContentEditingService.

* Remove obsolete constructors and methods on ContentService/IContentService.

* Removed obsolete constructor in ContentTypeEditingService.

* Removed obsolete constructor in MediaTypeEditingService.

* Removed obsolete constructor in MemberTypeEditingService.

* Removed obsolete constructor in ContentTypeService.

* Removed obsolete constructors in ContentTypeServiceBase.

* Removed obsolete constructors and methods in ContentVersionService.

* Removed obsolete constructor in DataTypeUsageService.

* Removed obsolete constructor in DomainService.

* Removed obsolete constructor in FileService.

* Removes obsolete AttemptMove from IContentService.

* Removes obsolete SetPreventCleanup from IContentVersionService.

* Removes obsolete GetReferences from IDataTypeService.

* Removed obsolete SetConsentLevel from IMetricsConsentService.

* Removed obsolete methods from IPackageDataInstallation.

* Removed obsolete methods from IPackagingService.

* Removed obsolete methods on ITwoFactorLoginService.
Removed obsolete ITemporaryMediaService.

* Removed obsolete constructor from MediaService, MemberTypeService and MediaTypeService.

* More obsolete constructors.

* Removed obsoleted overloads on IPropertyValidationService.

* Fixed build for tests.

* Removed obsolete constructor for PublicAccessService, UserService and RelationService.

* Removed GetDefaultMemberType.

* Removed obsolete user group functionality from IUserService.

* Removed obsolete extension methods on IUserService.

* Removed obsolete method from ITelemetryService.

* Removed obsolete UdiParserServiceConnectors.

* Removed obsolete method on ICookieManager.

* Removed obsolete DynamicContext.

* Removed obsolete XmlHelper.

* Fixed failing integration tests.

* Removed obsoletes in Umbraco.Cms.Api.Common

* Removed obsoletes in Umbraco.Cms.Api.Delivery

* Removed obsoletes in Umbraco.Cms.Api.Management

* Removed obsoletes in Umbraco.Examine.Lucene

* Removed obsoletes in Umbraco.Infrastructure

* Fix failing delivery API contract integration test.

* Made integration tests internal.

* Removed obsoletes from web projects.

* Fix build.

* Removed Twitter OEmbed provider

* Removed obsolete constructor on PublishedDataType.

* Removed obsolete constructors on PublishedCacheBase.

* Removed the obsolete PropertyEditorTagsExtensions.

* Removed obsoletion properties on configuration response  models (#18697)

* Removed obsolete methods from server-side models.

* Update client-side types and sdk.

* Update client-side files.

* Removed obsoletion of Utf8ToAsciiConverter.ToAsciiString overload. (#18694)

* Removed obsolete method in UserService. (#18710)

* Removed obsoleted group alias keys from being publicly available. (#18682)

* Removed unneceessary ApiVersion attribute.

* Clean-up obsoletions on MemberService (#18703)

* Removed obsoleted method on MemberService, added future obsoletion to interface and updated all callers.

* Removed obsoletion on member service method that's not obsolete on the interface.
2025-03-21 17:02:31 +00:00
Andy ButlandandGitHub 394210a8f7 Uses correct preview cookie same site and secure settings to allow preview mode to flow between links in the preview frame (#18640)
* Uses correct preview cookie same site and secure settings to allow preview mode to flow between links in the preview frame.

* Fixed comment.
2025-03-21 15:20:08 +01:00
Niels LyngsøandGitHub 45b0e43b89 Feature: validation variant filtering + up-front validation path translation (#18561)
* implement console.warn

* variant specific validation contexts

* getByType method

* test for getByType

* corrected test

* no need for fallback here

* revert

* support path starting with array query

* draft

* scoped json path mapper

* JSDocs correction

* rename function

* umbQueryMapperForJsonPaths

* JSDocs

* Validation Path Translation manager

* Validation Property Path Translation Manager

* rename

* rename folder

* rename folder correction

* impl for server validation context

* rename

* .

* clean up

* re introduce queryConstructor

* correct mappers

* correct imports

* implement path translator

* content detail path translator

* test with extension type propertyValidationPathTranslator

* implement translator system for block editors

* validation fixes to prevent issues
2025-03-21 12:59:06 +01:00
Jacob Overgaard fb3a56a240 Merge branch 'v15/dev' into v16/dev 2025-03-21 12:25:41 +01:00
Niels LyngsøandGitHub c21da38c32 rename icon and regenerate icons (#18754) 2025-03-21 11:36:46 +01:00
Niels LyngsøandGitHub ef751ca699 style adjustments (#18757) 2025-03-21 11:35:37 +01:00
Niels LyngsøandGitHub 52debc3010 make numbers go right side (#18759) 2025-03-21 11:34:36 +01:00
Niels LyngsøandGitHub a38a9b29a3 addd var(--umb-card-medium-min-width) (#18760) 2025-03-21 11:34:03 +01:00
Jacob Overgaard 0d1afcf3c7 Merge branch 'v15/dev' into v16/dev 2025-03-21 11:08:31 +01:00
Jacob Overgaard a82e0ca23a fix: add nullability check to modalManager 2025-03-21 11:07:59 +01:00
Jacob Overgaard e346ac2bee build: add emptyOutDir to base vite config to ensure modules are emptied before build
this does not have any effect on the release build since it always starts from fresh - it is mostly to ensure no dev files are left behind locally
2025-03-21 11:05:57 +01:00
Andy Butland 663be397dc Merge branch 'v15/dev' into v16/dev 2025-03-21 09:11:06 +01:00
Andreas ZerbstandGitHub 425901636e V15 QA updated nightly pipeline tests (#18746)
* Removed tests for removed features

* Fixed failing tests

* Bumped version
2025-03-21 08:03:28 +00:00
Niels Lyngsø d9f17b36c6 Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/packages/multi-url-picker/property-editor/property-editor-ui-multi-url-picker.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/property-editors/multiple-text-string/property-editor-ui-multiple-text-string.element.ts
#	version.json
2025-03-20 18:53:11 +01:00
Lee KelleherandGitHub 5fe5a16158 Tiptap RTE: Table Properties toolbar menu + modal (#18751)
* Tiptap Table Properties modal

* Attempting to reduce the cyclomatic complexity
2025-03-20 17:36:28 +01:00
131c9cda6f hotfix #18735 (#18750)
* fix multiple text string validation

* notify about messages

* cherry picked fix

* protection again unnecessary calls

* json path cherry pick + tests

* validation message change lock

* cherry pick from control lifecycle

* optimization

* propagate errors

* cherry picked sync

* query umb-input-multiple-text-string

* remove unused import

* remove optional chain expression

* use !

* outcomment the error handling

* outcomment more promise rejection error

* Fixed issue with multi URL picker.

* remove unesecary warning

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-20 16:22:05 +00:00
kjac 83aca5aa6e Merge branch 'v15/dev' into v16/dev 2025-03-20 14:52:35 +01:00
Niels LyngsøandGitHub e999d3977c change button look (#18678) 2025-03-20 12:55:29 +01:00
Sven Geusens f7854b8c95 Version bump 2025-03-20 11:08:38 +01:00
Jacob Overgaard 0f98b8342c Update branches (v16)
Removed v12, added v15 and v16
2025-03-20 10:49:02 +01:00
dependabot[bot]andJacob Overgaard b13f90046d Bump esbuild and vite in /src/Umbraco.Web.UI.Client
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.1 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.24.2 to 0.25.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.2...v0.25.1)

Updates `vite` from 6.1.0 to 6.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 10:15:54 +01:00
Jacob Overgaard 304db8c28a Merge branch 'v15/dev' into contrib 2025-03-20 09:42:56 +01:00
dependabot[bot]andJacob Overgaard 723d3be905 Bump esbuild and vite in /src/Umbraco.Web.UI.Login
Bumps [esbuild](https://github.com/evanw/esbuild) to 0.25.1 and updates ancestor dependency [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). These dependencies need to be updated together.


Updates `esbuild` from 0.24.2 to 0.25.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.2...v0.25.1)

Updates `vite` from 6.1.0 to 6.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.2/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-20 09:35:07 +01:00
Andy Butlandandkjac 5f37cd3d20 Make preview check for delivery API content case insensitive. (#18731) 2025-03-20 06:56:43 +01:00
Warren BuckleyandGitHub 203cc0e380 Updates dashboard to use uui-box headline property/attribute & place button in header-actions (#18736) 2025-03-19 23:29:56 +00:00
442de9a803 remove open config (#18592)
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 20:24:25 +00:00
Mads RasmussenandGitHub eea6b9b2f1 Feature: Language Item Ref (#18521)
* add entity type to interface

* use item-ref in language input

* register ref item
2025-03-19 20:51:25 +01:00
b3b1ce2dcd Bugfix: block culture permissions (#18665)
* always allow copy

* add back readonly check

* render pencil icon if the property is read only

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-03-19 19:42:04 +00:00
69b69a5fc1 V15: Change drag and drop icon (#18519)
* register new drag icons

* use drag icon in sort-children-of modal

* update drag icons

* only use the vertical icon style

* Update property-editor-ui-image-crops.element.ts

* rename to grib

* reset formatting for merge conflict

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 19:39:18 +00:00
Mads RasmussenandGitHub 605cda9224 Bugfix: Document granular user permission preset (#18651)
* pass fallback permissions to document granular permissions

* set as preset

* clean up
2025-03-19 19:36:12 +00:00
b65ad4e234 Fix focal point drag not working on firefox (#18674)
* fix focal point drag not working on firefox

* prevent reacting to left click

* only left click for drag

---------

Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-03-19 16:15:34 +00:00
Jacob OvergaardandGitHub 4e680c88bb build(deps): bump @umbraco-ui/uui from 1.13.0-rc.1 to 1.13.0-rc.2 (#18677) 2025-03-19 15:20:09 +00:00
Jacob OvergaardandGitHub e8f991f485 V15: Adds accepted image types for image cropper (#18715)
* fix: adds accepted image types for image cropper

* chore: cleanup imports and types

* feat: adds a loader until all prerequisites have been resolved for image cropper

* feat: adds method to share temp file configuration
2025-03-19 12:36:51 +00:00
leekelleherandJacob Overgaard 66891333a8 Refactored the Tiptap Table toolbar button
to only show the table actions when the table is active,
otherwise show the Insert Table feature.
2025-03-19 13:26:04 +01:00
Lee KelleherandGitHub 044c9d2c87 Tiptap RTE: Table column/row bubble menu (#18708)
* Code formatting

* Icons for Tiptap table row/column actions

* Combined Tiptap exports

Removed extra constant

* Added Table Column Menu

* Added Table Row Menu

Made the bubble menu reusable
2025-03-19 13:25:13 +01:00
Andy ButlandandGitHub 7b0c419ace Adds detail of how many characters you are over when validating text fields for length. (#18722) 2025-03-19 12:02:40 +01:00
Jacob Overgaard 6ec1b9f1e4 build(deps-dev): bump storybook from 8.5.7 to 8.6.7 and run necessary migrations 2025-03-19 10:14:59 +01:00
Andy ButlandandGitHub 18069633b2 Used documented settings for the media seed cache. (#18723) 2025-03-19 09:47:12 +01:00
b24c29c647 V15: Extend search endpoints (#18634)
* Extend content type search endpoint

* Refactor to be able to specify trashed or not

* Simplify and extract into own method

* Fix breaking ctor

* Make non actions in controllers

* Fox up search service

* Add third ctor to avoid errors

* Update query to filter by is element

* Also implement for media

* Minor formatting and clean-up

* Re-introduce (and obsolete) the previous constructor

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-03-19 09:12:44 +01:00
Niels Lyngsø 991b8bfb37 Merge branch 'v15/dev' into v16/dev 2025-03-18 14:42:44 +01:00
Niels Lyngsø 6c9ff96972 fix UmbContextConsumer 2025-03-18 14:41:01 +01:00
Andreas ZerbstandGitHub f3f7fcc051 V15 QA added acceptance tests for block list variants (#18654)
* Moved tests

* Added variant tests

* Updated usage of helper

* Added tests

* Cleaned up

* Bumped version and added test command
2025-03-18 11:17:07 +00:00
Andreas ZerbstandGitHub b6fa93edac V15 QA added Tip Tap block variant acceptance tests (#18668)
* Moved tests

* Added variant tests for tiptap

* Updated file name

* Added test command

* Bumped package lock file

* removed npm command

* Bumped test helpers
2025-03-18 10:37:11 +00:00
Andy ButlandandGitHub b07a24ba55 Added clarifying comments to the logic for granular permissions. (#18705) 2025-03-18 11:08:30 +01:00
Niels Lyngsø 0d4acb440d fix context consumer test 2025-03-18 10:54:07 +01:00
Andy ButlandandGitHub 42cb9b5c1e Removes one of the two duplicate ContentPublishingNotification publishings. (#18702) 2025-03-18 10:52:32 +01:00
Andreas ZerbstandGitHub 88657c1bb0 V15 QA added acceptance tests for block grid variants (#18658)
* Added block grid variant tests

* Bumped version

* Updated command to run tests on pipeline

* Removed test command

* Fixed comment
2025-03-18 09:35:28 +00:00
Andy ButlandandGitHub e91a25dcb6 Restrict valid API user client IDs to 100 characters. (#18688) 2025-03-18 06:33:24 +01:00
Lee KelleherandGitHub 81e63e7fa9 Tiptap RTE: Added data-mark attributes (#18689)
Tiptap: adds `data-mark` attributes to RTE, toolbar and toolbar items.
2025-03-18 11:22:20 +07:00
Andy Butland 3f5898ba95 Merge branch 'v15/dev' into v16/dev 2025-03-17 15:49:20 +01:00
Andy ButlandandGitHub 2f9d58fc68 Fixes link for access to composition from document type property outside of group. (#18686) 2025-03-17 11:16:35 +01:00
Niels Lyngsø 939552e9f1 Merge branch 'v15/dev' into v16/dev 2025-03-17 11:09:30 +01:00
Niels Lyngsø e9ba06929f Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	version.json
2025-03-17 11:09:18 +01:00
Niels Lyngsø 0a7d0a8f8b Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-03-17 11:08:27 +01:00
Andy Butland a5da305093 Merge remote-tracking branch 'origin/v13/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs
#	src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Authorization/MediaPermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Authorization/PermissionsQueryStringHandler.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.UI.Client/lib/tinymce/langs/da.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/less/components/users/umb-user-cards.less
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
#	src/Umbraco.Web.UI.Client/src/views/users/views/users/users.html
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandlerTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/MediaPermissionsQueryStringHandlerTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Authorization/MediaPermissionsResourceHandlerTests.cs
2025-03-17 09:20:40 +01:00
Andy ButlandandGitHub e1e5f527e4 Updates dependency on Examine to 3.7. (#18676) 2025-03-17 09:13:09 +01:00
Niels LyngsøandGitHub b9eb988d29 V16/feature: get context resolves in undefined if not found (#18611)
* implement getContext rejecter + allow for resolving in undefined

* fix test

* timeout concept

* adjustments

* adapt implementation

* ability to set timeoutFrame for faster test

* update

* make sure provider only provides when connected

* make sure action apis can fail without resolving

* make sure to await the arrival of the UMB_AUTH_CONTEXT

* no need to be async

* consume to stay up to date

* one rendering cycle approach

* adjusting context consumption part 1

* implementation adjustments

* correction patch 2

* correction patch 3

* correction batch 4

* correction batch 5

* correction batch 6
2025-03-14 14:06:45 +00:00
Niels Lyngsø f4e0e38824 Merge branch 'contrib' into v15/dev 2025-03-14 10:21:27 +01:00
Niels Lyngsø fa09ce6214 justify tag 2025-03-14 10:20:23 +01:00
Lee KelleherandGitHub dd8fb66300 Content Picker: Filter out invalid entity types (#18660)
* Reverted `elementName` constant

+ code tidy-up

* Filter out values that don't match the configured entity-type

Fixes #18476

* Notifies the user of invalid data/configuration

with an option to remove invalid data.
2025-03-14 09:55:45 +01:00
Lee KelleherandGitHub a02db287ce Tiptap RTE: Text Indent extension + toolbar items (#18672)
* Tiptap: Text Indent extension

* Updates indent manifest icons
2025-03-13 14:52:58 +00:00
e9c97f8c9b Allow multiple URL segments per document (#18603)
* Code tidy - XML header comments, method ordering, warning resolution.

* Add extension method for retrieving all URL segments for a document.

* Cache and persist multiple URL segments per document.

* Allowed segment providers to terminate or allow additional segments.
Set up currently failing integration test for expected routes.

* Resolved cache issue to ensure passing new integration tests.

* Fixed failing integration test.

* Test class naming tidy up.

* Added resolution and persistance of a primary segment, to retain previous behaviour when a single segment is retrieved.

* Further integration tests.

* Resolved backward compatibility of interface.

* Supress amends made to integration tests.

* Aligned naming of integration tests.

* Removed unused using, added XML header comment.

* Throw on missing table in migration.

* Code clean-up.

* Fix multiple enumeration

* Used default on migrated column.

* Use 1 over true for default value.

* Remove unused logger

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-13 12:47:46 +00:00
Lan Nguyen ThuyandJacob Overgaard f016dbd223 Fix issue text overflow when user name is too long 2025-03-13 11:07:57 +01:00
Mathias HelsengrenandJacob Overgaard da5669d9fc Remove the hardcoded color for the text in error message 2025-03-13 11:04:30 +01:00
Jacob Overgaard 74aa3d9676 bump version to 15.4.0-rc 2025-03-13 10:46:43 +01:00
Andy Butland 9beb679dbf Merge branch 'v15/dev' into v16/dev 2025-03-13 10:43:42 +01:00
Niels LyngsøandGitHub c671668e45 remove min height and max height configuration options (#18648) 2025-03-12 21:33:37 +01:00
Niels LyngsøandGitHub e337821d0e align search icon vertical (#18657) 2025-03-12 21:23:41 +01:00
leekelleherandJacob Overgaard 95fcf645dc Awaits super.openPicker() 2025-03-12 13:35:35 +01:00
Andy Butland 9b3da86192 Merge branch 'v15/dev' into v16/dev 2025-03-12 12:29:09 +01:00
Andy Butland b2aa04ae1a Merge branch 'release/13.7.2' into v13/dev
# Conflicts:
#	version.json
2025-03-12 12:18:45 +01:00
Nhu DinhandGitHub d3c6c87378 V15 QA Added acceptance tests for trash reference by (#18627)
* Added tests for Trash content

* Verified the reference headline

* Updated tests

* Added more tests for trash content

* Updated due to test helper changes

* Bumped version

* Maked trash content tests run in the pipeline

* Fixed comments

* Reverted smokeTest command
2025-03-12 09:58:41 +00:00
Niels LyngsøandGitHub b3e192916d correct labels (#18650) 2025-03-12 09:17:20 +00:00
Andreas ZerbstandGitHub dfe100d7fc V15 QA added block grid with areas tests (#18641)
* Started testing block areas

* Added tests

* Added more tests

* Finished tests

* Moved tests

* Skipped tests

* Fixed comments

* Runs the created tests on the pipeline

* Reverted test command
2025-03-12 09:10:38 +00:00
Andreas ZerbstandGitHub 3420748b35 V15 QA reduced amount of browser downloaded on pipeline to reduce download time (#18642)
* Updated pipeline

* Fixed command
2025-03-12 09:40:03 +01:00
Andy ButlandandGitHub e270adc50f Reverts UI updates from publish with desdendants dialog. (#18647) 2025-03-12 08:10:34 +01:00
Andy Butlandandkjac de282d0fbf Reverts UI updates from publish with descendants dialog (15) (#18646)
* Reverts UI updates from publish with descendants dialog.

* Removed unused variable.
2025-03-12 08:01:00 +01:00
Andy ButlandandGitHub ce9460161f Reverts UI updates from publish with descendants dialog (15) (#18646)
* Reverts UI updates from publish with descendants dialog.

* Removed unused variable.
2025-03-12 07:59:37 +01:00
Andy Butland fd5b8de533 Bumped version to 13.7.2 2025-03-12 07:25:35 +01:00
Andy Butland e3d9b042c2 Avoids collection was modified issue when flowing identities to the authenticated user's principal. (#18527) 2025-03-12 07:24:50 +01:00
Andy ButlandandGitHub 54931472f8 Corrects obsoletion message on ITwoFactorLoginService. (#18623) 2025-03-11 17:55:33 +00:00
df6a88b4d5 V15: Enable umbraco-extension client to auto-build (#18597)
* feat: adds autobuild of umbraco extensions created by the dotnet template

* adds file extensions to imports to follow the esmodule convention + apply formatting

* build(deps): upgrade hey-api, vite, typescript and generate new api

* chore: formatting

* clean up actions as client is now automatically being built when starting the site

* revert change with UMBRACO_VERSION_FROM_TEMPLATE

* revert if(includeExample)

* use template name

* use template name

* feat: update the way it sets the auth token

* add back in IncludeExample if

* fix: rename allowPackageTelemetry to allowTelemetry because that is what it is actually called

* `.csproj` amends

- Adds `BeforeTargets` to "BuildClient" target
- Adds "package.json" to "RestoreClient" target input
- Removes extra parameters from `npm i` command

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-03-11 16:14:47 +00:00
Jacob OvergaardandGitHub 2cc9d2cab0 fix: adds back support for legacy AllowPackageTelemetry (#18644)
Due to an unfortunate mistake in the Umbraco.Cms.Targets generated JSON schema, we alluded to supporting `allowPackageTelemetry` in the JSON files, however the backend didn't support this.
2025-03-11 15:51:38 +00:00
Jacob OvergaardandGitHub c0b6317da8 V15: Reduce the size of the package json schema (#18643)
* chore: combine similar commands

* fix: add specific ignore on tinymce

* fix: override the RawEditorOptions types from tinymce

this ensures that we do not have 70k lines of schema in the generated schema

* fix: import only from the extension-registry

this will automatically find all registered UmbExtensionManifest regardless of which package is imported
2025-03-11 15:50:26 +00:00
leekelleherandJacob Overgaard b2f69691d6 Adds validation to Checkbox List property editor 2025-03-11 14:33:34 +01:00
1d5a4dfa3a Chore: deprecate UmbPropertyValueChangeEvent for v.16 (#18455)
* deprecate

* fix import

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-11 13:51:49 +01:00
b684bf0a69 Prevents attempt to move an item to itself as a parent (#18550)
* Prevents attempt to move an item to itself as a parent.

* add default tree item type

* use pickable filter

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-03-11 13:30:24 +01:00
mole 9d7c2d4a82 add async keyword 2025-03-11 12:46:21 +01:00
Niels LyngsøandGitHub 3586f137fc avoid indifferences on property-entry property order (#18530) 2025-03-11 12:30:14 +01:00
Niels LyngsøandGitHub 5ccbf08365 Merge branch 'v15/dev' into v15/bugfix/nested-document-types 2025-03-11 12:25:01 +01:00
Lee KelleherandGitHub 434dd50021 Merge pull request #18633 from umbraco/v15/fix-bug/rte-code-editor-modal-pretty-print
Fix bug RTE code editor modal - pretty print not working
2025-03-11 10:55:49 +00:00
Mads Rasmussen 0e561da146 Merge branch 'v15/dev' into v16/dev 2025-03-11 11:43:07 +01:00
Andy ButlandandGitHub 863d3d11c6 Updates sort property and direction together to avoid intermittent failures (#18590)
* Updates sort property and direction together to avoid intermittent failures.

* Removed debug code.
2025-03-11 11:38:14 +01:00
Niels Lyngsø 85b3df6672 without UMB_ 2025-03-11 11:14:46 +01:00
Niels Lyngsø d8b5006b30 Merge branch 'v15/dev' into v15/bugfix/nested-document-types
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/modal/document-type-create-options-modal.element.ts
2025-03-11 11:06:12 +01:00
Niels LyngsøandGitHub d906fc346d use change event (#18631) 2025-03-11 09:19:19 +00:00
PhyxionNLandGitHub ced3db8542 Add NuGet badge (#18583) 2025-03-11 10:09:35 +01:00
Andy Butland 1f2afbaa1d Bumped version to 15.3.0-rc2. 2025-03-11 09:45:50 +01:00
Andy Butland e8e1b6ef33 Merge commit from fork
* Tighten management API endpoint access rules.

* Bumped version to 15.2.1.
2025-03-11 09:42:58 +01:00
Andy Butland 4803b4303d bumped imagesharp to prevent CVE-2025-27598 (#18602)
# Conflicts:
#	Directory.Packages.props
2025-03-11 09:42:47 +01:00
leekelleherandJacob Overgaard a48d8a4110 Adds validation to Radio Button List property editor
Fixes #18268
2025-03-11 09:34:31 +01:00
leekelleherandJacob Overgaard c1671f4e9b Adds validation to Dropdown List property editor
Fixes #17271
2025-03-11 09:32:35 +01:00
Andy Butland be4d4bef39 Merge branch 'release/15.2.3' into v15/dev
# Conflicts:
#	version.json
2025-03-11 09:27:22 +01:00
Andy Butland f4ae796b30 Merge branch 'v13/dev' of https://github.com/umbraco/Umbraco-CMS into v13/dev 2025-03-11 09:18:25 +01:00
Andy Butland 367d0386b6 Merge branch 'release/13.7.1' into v13/dev
# Conflicts:
#	version.json
2025-03-11 09:18:12 +01:00
Lan Nguyen Thuy 1d48261b7b fix bug rte code editor modal pretty print not working 2025-03-11 13:39:55 +07:00
Andy ButlandandGitHub ebb6a580dc Merge commit from fork
* Tighten management API endpoint access rules.

* Bumped version to 15.2.1.
2025-03-11 05:11:36 +01:00
5b54bed406 Merge commit from fork
* Fixed parsing of node if in content and media permission querystring handlers to retrieve expected value when multiple are provided in the querystring.

* Add HttpPost attributes to backoffice endpoints that should only accept post requests.

* Bumped version to 13.6.1.

* Narrow PermissionQueryString parsing to the releveant UmbracoObjectType

* Add missed update from v10

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-11 05:11:08 +01:00
Niels Lyngsø c8eb4f1d53 Merge branch 'v15/dev' into v16/dev 2025-03-10 16:54:38 +01:00
Nhu DinhandGitHub bc488d78e4 V15 QA Fixed the failing acceptance tests due to UI changes (#18617)
* Fixed the failing tests

* Bumped version

* Fixed can allow bulk trash in the media section

* Fixed notification message
2025-03-10 14:46:22 +00:00
Anders BjernerandMichael Latouche d3b60277d7 Fixed typo in TinyMCE's da.js 2025-03-10 15:38:50 +01:00
a51cbd3ee9 Added description to block list properties hide content editor (#18619)
* Added description to block list properties hide content editor

* Update the description to use localization

---------

Co-authored-by: Oskar kruger <obk@umbraco.dk>
2025-03-10 13:50:28 +00:00
458eb2e52f Tiptap RTE: Anchor extension + toolbar item (#18575)
* Tiptap: Anchor extension

* Corrected import; fixed the build

* Removed icon, mistakenly added to this branch

it was intended for the Character Map feature.

* Updated dialog style

* Scoped the Anchor modal to Tiptap package

Exported modal alias constant.

* Tweaked selected Anchor styling

* Localizes public labels

* Exported Anchor constants correctly

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-03-10 13:22:57 +00:00
Lee KelleherandGitHub 7ef11621dd Tiptap RTE: Character Map modal + toolbar item (#18577)
* Tiptap: Character Map extension

* Added missing icon! 🤦

* Added missing manifests

for the CharMap modal

* CharMap dialog styles

* Scoped the Character Map modal to Tiptap package

Exported modal alias constant.
2025-03-10 13:40:58 +01:00
Andy Butland 0d066c4ccc Merge branch 'release/15.3' into v15/dev 2025-03-10 12:04:42 +01:00
Andy ButlandandGitHub 4fe168f540 Removed obsolete integration test. (#18604) 2025-03-10 11:19:40 +01:00
Andy ButlandandGitHub 0d79a1f443 Fixed issue with max validation using default 0 value. (#18616) 2025-03-10 10:57:23 +01:00
Niels Lyngsø 98bf623721 Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs
#	src/Umbraco.Core/Configuration/Models/ContentSettings.cs
2025-03-09 21:28:23 +01:00
Andy Butland ead277ed3e bumped imagesharp to prevent CVE-2025-27598 (#18602)
# Conflicts:
#	Directory.Packages.props
2025-03-09 08:51:18 +01:00
Andy Butland c35d7d18a8 Merge remote-tracking branch 'origin/v13/dev' into v15/dev
# Conflicts:
#	Directory.Packages.props
2025-03-09 08:46:24 +01:00
twoday-rolandkockandAndy Butland 2ec6ff4ebc bumped imagesharp to prevent CVE-2025-27598 (#18602) 2025-03-09 08:43:52 +01:00
twoday-rolandkockandGitHub 78a8d017a2 bumped imagesharp to prevent CVE-2025-27598 (#18602) 2025-03-09 08:41:06 +01:00
Anders ReusandGitHub 50c3756eb0 V15 QA added test for issue 18555 (#18601)
* Added accceptance test for issue 18555

* Bumped version
2025-03-07 13:51:26 +01:00
Sven Geusens c757f9fcb0 Merge remote-tracking branch 'origin/release/15.3' into v15/dev 2025-03-07 09:13:15 +01:00
Niels LyngsøandGitHub c03b1612b6 update UUI (#18593) 2025-03-06 18:55:14 +00:00
Mads RasmussenandGitHub a79095a869 Support root/area allowed types when pasting in Block Grid (#18480)
* poc allowed root types

* optional filter

* wip custom paste action for block grid

* pass filter

* add filter to property action

* add js docs

* add type

* add type

* add type

* implment filter for block grid areas

* use correct types

* use correct types

* clean up

* update root paste

* clean up

* fix grid paste filter

* fix linter

* Update clipboard.property-context.ts
2025-03-06 14:20:47 +01:00
MoleandGitHub 95c892000d V15: Add textbox and text area serverside validation (#18596)
* Add validation to TextOnlyValueEditor

* Fix tests

* Add tests
2025-03-06 12:19:28 +00:00
Andy ButlandandGitHub 7b6cef6083 Added missing translations for dictionary import. (#18551) 2025-03-06 12:40:42 +01:00
Nikolaj GeisleandGitHub cb78e524d8 Remove duplicate webhook registration (#18594) 2025-03-06 11:24:48 +00:00
Lee KelleherandGitHub 5bf63c2fa8 Tiptap: Block extension config refresh (#18569)
Refreshes the UI after the Block extension
option has been set as enabled/disabled.

Fixes #18541
2025-03-06 11:42:44 +01:00
Lee KelleherandGitHub a939f8ee1c Chore: Tiptap code sweep 2 (#18579)
* Updates "rte-content.css" to share the Macro Holder style

* Tiptap toolbar menu padding

* Removed unnecessary `isActive` for Embedded Media toolbar button

* Adds scroll container to available toolbar item selection

* Toolbar config: adds style for "menu" items

* Adds missing mappings for the TinyMCE toolbar conversion

* Updates toolbar "menu" styling
2025-03-06 11:41:51 +01:00
29b4056f68 Added server side validation for the Multi Url Picker. (#18589)
* Plumbing

* Handle null value

* Add tests

* Fix error found in tests

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-06 09:52:55 +00:00
45ea6a3cfc Server side validation for property editors (multiple text strings) (#18581)
* Server-side validation for multiple text strings property editor.

* Added unit tests for block list min/max server validation.

* Add danish translations

* Add test showing issue

* Fix issue

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-06 09:48:48 +00:00
6d0dd82781 Move database cache rebuild to a background task with polling (#18496)
* Use background queue for database cache rebuild and track rebuilding status.

* Updated OpenApi.json and client-side types.

* Updated client to poll for completion of database rebuild.

* Update src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs

Co-authored-by: Sven Geusens <sge@umbraco.dk>

* Removed unnecessary obsolete attribute.

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-06 10:23:00 +01:00
7b422598f9 [V15] Align reserved property endpoints code and usage (#18319)
* Remove/enhance duplicate code

contentTypeEditing Services now use the IReservedFieldNamesService to determine invalid property alias values.

* Let Modelsbuilder define it's reserved property alias names

* Update, add tests + fix false positives

* Removed config check to register modelsbuilder required reserved properties

* Updated unittests regarding removed check of modelsbuilder mode

* Fix merge

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-06 09:16:00 +01:00
Niels LyngsøandGitHub 52bb32205b JSDocs update (#18586) 2025-03-06 09:15:30 +01:00
Niels Lyngsø 8a68457421 Merge branch 'release/15.3' into v15/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/MediaPicker3PropertyEditor.cs
#	src/Umbraco.Web.UI.Client/src/packages/documents/document-types/workspace/document-type/document-type-workspace-editor.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/media-type-workspace-editor.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/members/member-type/workspace/member-type-workspace-editor.element.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DecimalValueEditorTests.cs
2025-03-05 15:33:48 +01:00
Sven Geusens 04fa0df886 Fix pipeline api docs generation dependancy generation. 2025-03-05 15:18:26 +01:00
Kenn JacobsenandGitHub 11d9b3a1bd Match source block both on culture and alias (#18582) 2025-03-05 14:23:33 +01:00
84d5b7aa52 Server side validation for property editors (drop-down and checkbox list) (#18564)
* WIP...

* Localization and unit tests for multiple value property editor validation.

* Localization fixes.

* Clarified XML header comment.

* Add danish translations

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-05 12:17:31 +00:00
Sven GeusensandGitHub 0cead6f10a Fix Rich text block validation path (#18578)
* Made BlockEditorValidator itemDataGroups.Path overridable

* PR feedback
2025-03-05 12:42:29 +01:00
Andy Butland 62690194cf Fixed failing unit test following merge from v13/dev. 2025-03-05 11:47:27 +01:00
Markus JohanssonandGitHub 900938edd0 V15: Added uui-box around ungrouped properties during block editing (#18571) (#18572) 2025-03-05 08:44:49 +01:00
Mads RasmussenandGitHub bf7efbc268 fix custom views for block list and block rte (#18565) 2025-03-05 08:38:11 +01:00
Lee KelleherandGitHub 00e7602b55 V15: Resolves "Save and Preview" backoffice refresh (#18568)
* Reverted `elementName` constant

* Ensures the backoffice preview URL has correct slashes
2025-03-05 08:12:54 +01:00
Andy Butland 7a9e1b66d9 Merge remote-tracking branch 'origin/v13/dev' into v15/merge-from-13 2025-03-05 06:46:13 +01:00
1a205d8727 Handle multiline statements in migrations (#18478)
* Handle multiline statements in migrations

* Fixed failing unit tests and incorrect obsoletion.

* Fixed failing integration tests.

* Applied suggestion from code review.

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-04 17:27:33 +01:00
867d405992 Provide custom required validator for block list and toggle (#18474)
* Provide custom required validator for block list.

* Adds a custom required validator for the toggle to ensure the value provided is true.

* Remove unnecessary usings

* Remove redundant interface and base constructor

* Remove unnecessary interface

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-04 15:25:10 +00:00
a99c581ab5 V15: Add MNTP serverside validation (#18526)
* Add amount validator

* Add ObjectTypeValidator to MNTP

* Move validate startnode to helper method

* Validate allowed type

* Fix tests

* Added some XML header comments and resolved nit-picky warnings.

* Further XML comments.

* Fix null validation case

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-04 16:06:05 +01:00
Mads RasmussenandGitHub 85883cee85 Feature: Has Children Condition (#18161)
* add children to reload translation

* add has children condition + context

* export

* register manifests

* set hasChildren value for tree items

* add condition to document tree item

* add has children condition to sort children of document

* add conditions for media

* add entity trashed event

* dispatch event when entity is trashed

* remove double event listeners

* export action class

* Update default-tree.context.ts

* wip reload tree when entity is trashed

* move into data folder

* clean up listeners

* move manifest

* wip reload root

* clean up

* add recycle bin tree item

* use for media

* pass entity types through manifest + add recycle bin tree item kind

* remove custom implementation for document recycle bin

* use kind

* rename to supportedEntityTypes

* Update recycle-bin-tree-item.context.ts

* clean up

* remove condition

* only show empty recycle bin if it has children

* remove of sort children
2025-03-04 14:22:22 +00:00
Andy Butland b9cbce561c Merge branch 'release/15.3' of https://github.com/umbraco/Umbraco-CMS into release/15.3 2025-03-04 14:54:44 +01:00
Andy ButlandandMole 51223f44ff Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 14:54:30 +01:00
0f9c2332e0 Adds unit tests for RequiredValidator. (#18471)
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 13:49:37 +00:00
Andy Butlandandmole 7629b85861 Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 14:47:22 +01:00
a7f5b142e9 Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints (#18508)
* Fix issue with server validation from dictionary configuration where floating point values can be be accessed as doubles or ints.

* Fixed typo in comment.

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-03-04 13:46:54 +00:00
Andy Butland d164892619 Handle create and update validation for media picker. (#18537) 2025-03-04 14:09:07 +01:00
Andy ButlandandGitHub ca6da751f2 Handle create and update validation for media picker. (#18537) 2025-03-04 14:08:08 +01:00
Nikolaj GeisleandGitHub 8d289846e1 Update nuget packages (#18559) 2025-03-04 13:49:11 +01:00
Mads RasmussenandGitHub 5358c0346e remove the word folder in label (#18485) 2025-03-04 12:21:51 +00:00
6d5b6a4553 Server side validation for property editors (colour picker) (#18557)
* Added server-side validation for colour picker.

* Minor refactor.

* Add danish translation

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-04 12:13:37 +00:00
Andy ButlandandGitHub 396b5ea211 Avoids collection was modified issue when flowing identities to the authenticated user's principal. (#18527) 2025-03-04 12:12:29 +01:00
Mads Rasmussen 7e4dda7bab fix block grid custom views 2025-03-04 12:11:01 +01:00
Mads RasmussenandGitHub 3491afefbb fix block grid custom views (#18558) 2025-03-04 12:09:56 +01:00
Andy ButlandandGitHub 3cf9099f56 Remove version from models builder generated code header when configured to do so. (#18501) 2025-03-04 11:52:20 +01:00
Andy Butland d167a60373 Correct handling of step values of zero. (#18532) 2025-03-04 11:51:19 +01:00
Andy ButlandandGitHub 92cb355f4d Correct handling of step values of zero. (#18532) 2025-03-04 11:18:23 +01:00
Mads RasmussenandGitHub fb11191fd1 Feature: Content Type Workspace Editor Header Element (#18520)
* add content-type-workspace-editor-header element

* use for document type

* use in media and member type workspaces

* fix type errors
2025-03-04 10:10:57 +01:00
Andy Butlandandkjac b650e7984e Fixes multiple available constructors exception for execute template query constructor. (#18552) 2025-03-04 10:04:06 +01:00
30186e0bdd V15 QA Fixing the failing acceptance tests 03032025 (#18549)
* Fixed Content tests with slider

* Updated Content tests with true/false

* Fixed due to api helper changes

* Updated tests related to the user has no permission due to an issue

* Added .fixme for Content tests with tiptap

* Bumped version

* Fixed tests for renaming a media

* Added .fixme for the failing tests due to the actual issues

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-03-04 09:00:45 +00:00
Jacob OvergaardandGitHub 2b24b40a75 V15: Workspace buttons cannot be overwritten in all cases (#18525)
* fix: consider that overwrites can be strings OR arrays

* chore: formatting

* chore(mock): use correct javascript for mock plugins

* chore: uses intersection helper method to save on code

* fix: should work without requesting extra update to the the extensions controller refreshing the state
2025-03-04 08:54:38 +00:00
Andy ButlandandGitHub 09bcede957 Fixes multiple available constructors exception for execute template query constructor. (#18552) 2025-03-04 09:51:36 +01:00
Chris HoustonandSebastiaan Janssen 998b6f9296 Fixes the Fatal icon text so it's readable in Dark Mode. (#18375) 2025-03-04 09:45:33 +01:00
2826678049 Added option for filtering the content types allowed as children based on the parent node (#18380)
* Added option for filtering the content types allowed as children based on the parent node.

* Updated OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Sven Geusens <sge@umbraco.dk>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-03-04 09:34:17 +01:00
Kenn JacobsenandGitHub 67ed38f6a2 Guard against element type mismatch at document type creation (#18529) 2025-03-04 09:29:29 +01:00
Mads RasmussenandGitHub fbe2cfacd8 set additionalOptions on the rollback entity action (#18489) 2025-03-04 09:18:53 +01:00
Andy ButlandandGitHub e8ff21987b Fixed grammer of unauthorized message. (#18553) 2025-03-04 08:37:09 +01:00
Andy Butland b9250c20e9 Merge branch 'v15/dev' into contrib 2025-03-04 07:43:10 +01:00
Jacob OvergaardandGitHub e9ef05057e V15: Adds migration of data type configuration when changing property editor UI (#18534)
* feat: adds comparer to keep useful data around when migrating from one property editor ui to another

this is really useful when migrating from tinymce to tiptap for example

* stores values in property to access later
2025-03-03 21:22:36 +00:00
Mathias HelsengrenandJacob Overgaard 8379cba15d Changed so the the logviewer's date input is using the umb-input-date instead, gave the umb-input-date a color-scheme option, and added the color-scheme dark, for the darkmode css. 2025-03-03 22:02:39 +01:00
51cce234f4 V15: Allows certain adjustments of the logo (#18499)
* feat: uses the app-logo component to show the large logo

* feat: rename and publish CSS variables to modify the logo

* feat: sets size of logo to 55px to match login screen

* feat: adds css variables to customize the dimensions of the login logo

* fix: uses `ifDefined` in case logo is not defined

* fix: uses the intrinsic logo path from `when()`

* Fixed up import types

* uses the intrinsic alternative logo path from `when()`

* feat: changes logo based on theme

* feat: forces dark theme on the header logo

* feat: adds blue logomark

* feat: adds logo-alternative path to the backend

* chore: minify logos

* feat: optimises logo sizes

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-03-03 15:54:22 +00:00
865a2cd83a Added tests and localization to radio button validation (#18512)
* Added tests and localization to radio button validation.

* Remove unnecessary ToString

* Add danish translations

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-03-03 12:23:55 +00:00
Andy ButlandandGitHub 33d83e1491 Added obsoletion messages for unused interface and implementation for cache rebuilds (#18524) 2025-03-03 13:16:23 +01:00
Andy ButlandandGitHub f6b4ddf598 Localize the email property editor validation and add tests (#18461)
* Localize the email property editor validation and add tests.

* Reverted trim to ensure behaviour for whitespace is unchanged.
2025-03-03 13:13:50 +01:00
13c788d6ec Add AsyncMigrationBase, update base classes and call async methods (#17057)
* Add AsyncMigrationBase, update base classes and call async methods

* Restored and obsoleted synchronous execution on IMigrationPlanExecutor.

* Resolved breaking changes.

* Fixed build.

* Further obsoletes.

* Fix build against v16/dev.

* Removed and obsolete code related to post-migrations.

* Removed service registration of unused interface.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 11:54:22 +01:00
780184e553 Remove UmbracoPath setting (#16037)
* Use require modifier instead of setting null-suppressed default values

* Only remove read-only properties when IgnoreReadOnlyProperties is set

* Obsolete UmbracoPath property and remove work-around for obsolete setter

* Remove UmbracoPath setting and use constant instead

* Remove usage of GetBackOfficePath

* Add IHostingEnvironment.GetBackOfficePath() extension method

* Add Constants.System.UmbracoPathSegment constant

* Update Constants.System XML docs

* Replace StringBuilder with string interpolation

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

* Fix syntax error

* Removed uses of obsoletes.

* Further obsolete messages.

* Cleaned up usings.

* Update src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 07:38:30 +01:00
Nhu DinhandGitHub 2ebc6badd7 V15 QA Publish E2E test results in the Azure pipeline (#18498)
* Updated playwright config to export the Junit report

* Published the Junit report

* Fixed

* Updated outputDir

* Make one test failed

* Changed npm command

* Fixed outputFile

* Updated folder to export test result

* Make another tests failed

* Updated publish test results job

* Changed testSQLite command

* Updated testRunTitle

* Changed npm command

* Updated testRunTitle

* Reverted

* Fixed comment

* Make some tests failed to test

* Reverted
2025-03-03 13:11:07 +07:00
561d871677 Remove await Task.FromResult() and unnecessary async modifiers (#16535)
* Remove await Task.FromResult and unnecessary async modifiers

* Remove usage of await Task.WhenAll() to avoid deadlocks

* Fix code formatting

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-03-03 06:47:37 +01:00
Andy Butland 064a71240e Merge branch 'v15/dev' into v16/dev 2025-03-03 06:43:17 +01:00
Mads Rasmussen 2bb894c038 15.3: Hotfix: Content type discard changes (#18490)
* wrap in entity detail workspace element

* use element on media type and member type

* add developer console warning

* sync current data with owner content type

* Update content-type-workspace-context-base.ts

* fix lint error
2025-02-28 20:15:47 +01:00
Lee KelleherandGitHub 3ef9d64f1a Tiptap RTE: Stylesheets (#18502)
* Copies the "TinyMCE Stylesheets Property Editor UI" to the Templating/Stylesheet package

* Deprecates the "TinyMCE Stylesheets Property Editor UI"

as it may be used in 3rd party extensions.

TinyMCE will be removed in v16, but this deprecation notice in 15.4
will at least notify that the "Umb.PropertyEditorUi.StylesheetPicker"
UI can be used.

* Updates TinyMCE to use the Stylesheet Picker UI

* Prevent Stylesheet folders from being picked

+ UI tweaks

* Updates Stylesheet mock data

* Stylesheet Rule Input - removes Edit button

uses `@open` event for UI consistency with other pickers.

* Updates pangram

* Amending to be "header" instead of "heading"

* Adds "stylesheets" config to Tiptap data-type

* Updates RTE styles for Tiptap

Moves "StarterKit" styles to the RTE Essentials extension registration.

Scopes TinyMCE in "rte-content.css" (for now).
2025-02-28 15:37:52 +00:00
Andy ButlandandJacob Overgaard a20f11e48f Makes a few labels friendlier for screen readers. 2025-02-28 16:07:56 +01:00
Mads RasmussenandGitHub 4795609973 Removet the Tip tap placeholder text (#18486) 2025-02-28 14:01:54 +01:00
Mads RasmussenandGitHub 8e7809d37e align tags (#18487) 2025-02-28 13:56:05 +01:00
Mads RasmussenandGitHub 96febee559 add mandatory attribute (#18488) 2025-02-28 13:55:06 +01:00
Mads RasmussenandGitHub 9dfa110cb8 15.3: Hotfix: Content type discard changes (#18490)
* wrap in entity detail workspace element

* use element on media type and member type

* add developer console warning

* sync current data with owner content type

* Update content-type-workspace-context-base.ts

* fix lint error
2025-02-28 13:38:54 +01:00
Andy Butland 82eeb0737b Merge remote-tracking branch 'origin/v13/dev' into v15/merge-from-13
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
2025-02-28 07:40:43 +01:00
Andy Butland 451b5f96e7 Use windows for build agent to avoid hanging issues with Linux. 2025-02-28 06:57:35 +01:00
Andy Butland 15ebae5025 Bumped version to 13.7.1. 2025-02-28 06:57:00 +01:00
Andy Butland 64024e418f Bumped version to 15.2.3. 2025-02-28 06:48:13 +01:00
Nhu DinhandGitHub a7a6eb8af6 V15 QA Fixing the failing acceptance tests in the nightly build (#18466)
* Updated permission name due to UI changes

* Added skip to flaky tests

* Add skip to flaky tests

* Bumped version

* Updated content tests due to test helper changes
2025-02-27 11:44:39 +00:00
Lee KelleherandGitHub f6ab6eea75 Tiptap RTE: Reusable toolbar menu component (#18483)
* Adds Tiptap Toolbar Menu extension kind

a reusable menu component.

Removes the `unique` property for menu-items.

* Implements Font Family as toolbar menu kind

* Implements Font Size as toolbar menu kind

* Implements Style Select as toolbar menu kind

* Implements Table as toolbar menu kind

* Markup amends

* Mock data RTE content addition

* "TextDirection" manifest correction

* Text Align: made to be toggleable
2025-02-27 09:52:44 +00:00
Lee KelleherandGitHub 9809db4179 Tiptap: Text color + background color (#18482)
adds a reusable "color picker button" kind extension type.
2025-02-27 09:42:25 +01:00
Andy Butland 32bfbadb8e Merge branch 'release/13.7.0' into v13/dev
# Conflicts:
#	version.json
2025-02-27 06:47:15 +01:00
Nikolaj GeisleandGitHub 2bdeefec16 Pass preview to GetEntryOptions (#18470) 2025-02-26 21:48:03 +00:00
Kenn JacobsenandGitHub 5ed09ebefa Backport ShowUnroutableContentWarnings to V13 (#18479) 2025-02-26 20:13:27 +01:00
Niels LyngsøandGitHub 07bb2d1840 Feature: RTE blocks validation (#18453)
* restructure block list code a bit for better readability

* improve error message

* block list validation

* validation for RTE Blocks

* rte blocks validation
2025-02-26 13:10:59 +00:00
Niels Lyngsø 207bd7283c DX to inform about why there is a discard changes 2025-02-26 12:48:39 +01:00
Niels LyngsøandGitHub afe4a56ca7 createContainer shuld duplicate none owner parent containers (#18462) 2025-02-26 09:29:36 +01:00
Lee KelleherandGitHub 40fc911234 Tiptap: Text Direction extension + toolbar buttons (#18459)
for bidi support, right-to-left; left-to-right.
2025-02-26 08:38:46 +01:00
Andy Butland eaea7a67ba Bump version to 13.7.0. 2025-02-26 08:14:26 +01:00
Jacob OvergaardandGitHub e5d5f03818 V15: Schedule only languages you have access to (#18433)
* fix: shows all languages but only lets user click on available languages

same logic as used in publish modal

* fix: only adds "selected" languages to the value output

otherwise the server will not accept values from languages you do not have access to

* mark private properties
2025-02-25 14:58:20 +00:00
Niels LyngsøandGitHub ef4bef80d7 Fix: content structure promise (#18456)
* client validation for textarea

* keep response
2025-02-25 14:58:09 +00:00
Lee KelleherandGitHub 6938225c83 Chore: Tiptap code sweep (#18447)
* Streamlined Tiptap extension code for consistency

* Corrected `Umb.Kind.TiptapToolbar.Button` manifest

* Simplified the Tiptap placeholder text

* Media Upload: de-duplicated blobUrl 

* Simplified CSS

* Sets rendered Image CSS to 100% width rather than adding `width: 100%` to the `<img>` markup/content.
2025-02-25 14:49:39 +00:00
Mads RasmussenandGitHub 492eb639df implement pagination (#18441) 2025-02-25 15:28:21 +01:00
Niels LyngsøandGitHub 32da5a2358 Feature: enforce block variations to be present in all mandatory languages (#18280)
* no need to re-request cause application refreshes when user changes

* implement promise to retrieve languages

* expose on all mandatory languages, to ensure the right mandatory effect
2025-02-25 14:13:37 +00:00
Lee KelleherandGitHub 0794ff9bf5 Tiptap: Trailing Node extension (#18446) 2025-02-25 15:04:14 +01:00
Lee KelleherandGitHub 5db67ae6b9 Tiptap RTE: Table selection styling (#18444)
* Tiptap table: amend "selected" color

* Tiptap table: correct cell border

for selection.
2025-02-25 15:03:04 +01:00
Lee KelleherandGitHub 52063f04f2 Tiptap RTE: configuration localizations (#18125)
* Adds localizations for general RTE settings

* Adds localizations for Tiptap settings

* Adds "Edit source code" localization

For Tiptap's View Source Code modal headline.

* Added more Tiptap RTE localizations

Applied to TinyMCE where relevant.
2025-02-25 15:02:27 +01:00
4e5512fd8f Feature: Simpler app language request (#18278)
* no need to re-request cause application refreshes when user changes

* implement promise to retrieve languages

* add back the isAuth observable

* Update app-language.context.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-25 13:33:06 +00:00
Andreas ZerbstandGitHub 2e5a5b65fd V15 QA fixed flaky language tests (#18451)
* Added wait for flaky test

* Updated version
2025-02-25 13:06:52 +00:00
ebc38f4cb3 Server side validation for property editors (integer, decimal and slider) (#18428)
* Server side validation for integer property value editor.

* Apply suggestions from code review

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

* Applied further changes from code review.

* Localized validation messages.

* Added server-side validation for decimal property editor.

* Added server-side validation for slider property editor.

* Moved repeated step validation into a helper method.

* Add danish translations

---------

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2025-02-25 13:33:20 +01:00
Niels LyngsøandGitHub fe71f571bb Feature: Property Value Preset (#18423)
* property value preset type

* add version to comment

* move clone controller

* add JSDocs

* sort getByTypeAndFilter

* builder

* updates for extension type

* unit test

* test weight

* dynamic filter depending on situation

* async test

* combine ui and schema test

* make block creation async

* commit todos

* proper deprecation

* value can be undefined

* toggle preset api

* ability to observe and get all languages

* default config field

* change only to expose all Cultures

* Variant Presets

* fix test

* implementation for blocks

* TODO

* improve comment

* implement for ContentTypes

* always set culture and segment for variant values

* only set values that got a value

* todo notes

* also resolve init when createScaffold

* property-value-preset.Slider

* leaving some concept code for another time

* enable undefined

* revert

* sort properties when creating

* refactor into setCurrentData

* refactor to content data manager

* Keep order from persisted data

* refactor to also cover updateCurrent

* add type safety by making persisted partial as well

* lint corrections

* preset for markdown

* refactor to work with frozen data

* implement for MarkDown

* compare based on object properties not object as a whole

* only update persisted data in regards to what was saved

* fix tests
2025-02-25 12:33:01 +00:00
74eb66ef86 V15: Serverside Media Picker Validation (#18429)
* Add TypedJsonValidator to avoid duplicate serialization

* Add allowed type validator

* Validate multiple media toggle

* Add startnode validator

* Fix tests

* Add validation tests

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Add XML docs

* Remove unnecessary obsolete constructor

* Avoid multiple checks

* Use value instead of specific member names

* Remove test

* Optimize StartNodeValidator

* Clarify Validates_Allowed_Type

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-25 13:26:16 +01:00
790c451df1 Published status filtering (#18281)
* Initial refactor (pending more tests)

* Fix structural querying across changing publish states + add tests accordingly

* Add tests to validate ancestor and descendant order

* Remove axis querying from published status filtering

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-02-25 13:25:33 +01:00
Jacob OvergaardandGitHub c19b2286b3 feat: adds validation on date from/to inputs in the schedule modal (#18437) 2025-02-25 11:55:26 +00:00
Andy ButlandandGitHub 913205e614 Restored minimal default permissions for the writer user group. (#18449) 2025-02-25 10:29:54 +00:00
8c931d59bd Add Localization to Documentation Types - Structure - Collection (#18396)
* Localization changes to Documentation Types - Structure - Collection

* added the collections to en-us too

* Delete src/Umbraco.Web.UI/Umbraco.Web.UI.sln

* Adds collection:noItemsTitle

* Adds collection:noItemsTitle

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-25 09:03:02 +00:00
Niels LyngsøandGitHub 33ee1447cc Fix #18431 (#18445)
* Keep order from persisted data

* refactor to also cover updateCurrent
2025-02-25 09:44:31 +01:00
leekelleherandJacob Overgaard e448f4b174 Added TinyMCE toolbar to Tiptap toolbar mappings
for the Font and Style items.
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 3dfec52d55 Toolbar style tweaks 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 86942c34d8 Enhanced Span extension
Changed to be a `Mark`, as `Node`s aren't allowed within paragraphs.

Unregistered the `TextStyle` extension,
as it conflicts with the global `style` attribute feature.
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 85179dcfd3 Updated mock data 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 5037cc321f Tiptap TextStyle tweaks 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard da26fd1a3c Updates TinyMCE mock data
to show the font buttons in the toolbar
2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard d30af299ef Tiptap: adds Font Size toolbar button 2025-02-25 09:13:31 +01:00
leekelleherandJacob Overgaard 9f00e968a6 Tiptap: adds Font Family toolbar button 2025-02-25 09:13:31 +01:00
Niels LyngsøandGitHub a4f385ba01 Fix: remember validation state when creating (#18432)
* only reset state and load if its a new unique

* related clean up

* return response promise
2025-02-24 22:09:43 +01:00
Niels LyngsøandGitHub 347e898190 simplifying the use of props (#18430) 2025-02-24 18:50:29 +00:00
Kenn JacobsenandGitHub 3e291894e5 Fix validation for blocks in variant block editors (#18438) 2025-02-24 18:47:37 +01:00
Mads RasmussenandGitHub c431a5abfe Implement create options for Member Types + Fix issue when single option is a link (#18310)
* implement create options for member types

* export path consts

* add support for first action being a link

* add comment
2025-02-24 13:49:36 +00:00
a482ab239a Feature: Bulk Delete/Trash referenced by (#18393)
* add trash confirm modal

* make referenceRepo optional + adjust styling

* add referenceRepository to media trash action

* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add null check

* change to use entity-item-ref element

* register media item ref

* add fallback element

* show 3 references

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* add types for reference data source + repository

* split trash with relation into its own action

* render descendants with references

* fix length check

* set standalone attribute

* implement for media

* move trash

* wip delete with relation

* move to element

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* show references when deleting a document

* Update delete-with-relation-modal.element.ts

* use deleteWithRelation kind for media

* clean up

* localize trash

* fix type

* Update trash-with-relation.action.ts

* override confirm methods in trash and delete actions

* Update index.ts

* export constants

* Limit referenced-by document and media endpoints to references only.

* Update document-reference-table.element.ts

* add methods to get bulk references for documents

* wip bulk trash

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

* remove unused variant id

* export extension types

* wip bulk trash with relation

* debounce incoming events

* look up items + notify

* add todo

* temp solution to make it non breaking

* add bulk delete

* better description

* implement methods for are referenced

* change to use bulk trash with relation

* implement delete with relation kind

* deprecation warnings

* move files

* move files

* export const

* use correct kind

* align naming

* upper case Trash

* correct uui-text impl

* add comment about the v2 name

* fix circular depdendencies

* rename const

* split to module

* import global components

* more explicit naming

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-24 14:03:26 +01:00
Mads RasmussenandGitHub 5011241a54 remove unused href (#18413) 2025-02-24 13:47:49 +01:00
70be31b8f8 Added obsoletion methods for extension methods to be removed in Umbraco 16 (#18394)
* Added obsoletion methods for extension methods to be removed in Umbraco 16.

* Updated obsolete messages to reference Umbraco 17

* Fix typo

---------

Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
2025-02-24 12:27:04 +00:00
Niels LyngsøandJacob Overgaard 6b50797693 also correct blocks despite markup haven't been touched in this session 2025-02-24 08:41:16 +01:00
Mads RasmussenandGitHub f64eb1261d set value so items can be removed (#18404) 2025-02-24 07:31:31 +00:00
Andy ButlandandGitHub a81cec963d Fixes count of message displayed when more than the maximum amount of blocks are added to a block list. (#18418) 2025-02-23 19:48:28 +01:00
Andy ButlandandGitHub de2114b8c5 Adds warning to publish descendants dialog when force re-publish is selected. (#18409) 2025-02-22 09:39:58 +01:00
Andy ButlandandGitHub c3b51301cc Adds warning to publish descendants dialog when force re-publish is selected (15) (#18410) 2025-02-21 23:17:23 +01:00
Jacob OvergaardandGitHub d5e2efbbaa V15: A user cannot switch back to the default language (#18414)
* chore: prettier

* fix: loads all extensions everytime but register only new localizations

this ensures that the browser is updated even if you switch back to a previously loaded language

* test: adds a test to check if we can switch between already loaded languages
2025-02-21 15:58:23 +00:00
a0ddaefaa1 Add localization for Approved color/Color Picker Data type (#18411)
* Add localization for Approved color/Color Picker Data type

* Apply suggestions from code review

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-21 11:50:08 +01:00
Andy Butland 678e942a2e Merge branch 'v15/dev' into v16/dev 2025-02-21 10:01:15 +01:00
Andy ButlandandGitHub c5c64f2b54 Ported changes from Umbraco 13 around not throwing exceptions with identity IDs that can't be parsed to an integer or GUID (#18389)
* Ported changes from Umbraco 13 around not throwing exceptions with identity IDs that can't be parsed to an integer or GUID.

* Revert async changes (better done systemically in a separate update).
2025-02-21 09:48:34 +01:00
368f6eb02d V15: Dont delete when referenced setting is enabled (#18359)
* Take content settings into account

* Implement test

* Amend error message

* Move new enums to have same values

* Update to check in ServiceBase

* Fix empty recycle bin

* Return proper operation status

* Apply suggestions from code review

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

* Fix according to feedback

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-02-21 07:07:13 +01:00
Niels Lyngsø 21a071675e correct uui-text impl 2025-02-20 16:33:19 +01:00
2c20902c9b Feature: Delete/Trash referenced by (#18351)
* add trash confirm modal

* make referenceRepo optional + adjust styling

* add referenceRepository to media trash action

* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add null check

* change to use entity-item-ref element

* register media item ref

* add fallback element

* show 3 references

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* add types for reference data source + repository

* split trash with relation into its own action

* render descendants with references

* fix length check

* set standalone attribute

* implement for media

* move trash

* wip delete with relation

* move to element

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* show references when deleting a document

* Update delete-with-relation-modal.element.ts

* use deleteWithRelation kind for media

* clean up

* localize trash

* fix type

* Update trash-with-relation.action.ts

* override confirm methods in trash and delete actions

* Update index.ts

* export constants

* Limit referenced-by document and media endpoints to references only.

* Update document-reference-table.element.ts

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

* remove unused variant id

* export extension types

* align naming

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-20 15:29:40 +00:00
78554f81f3 Feature: Data mapping extension + aligning reference lists (#18318)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* wip data mapper concept

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* Added $type to ReferenceResponseModels

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* generate server models

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* add fallback

* use ref list

* use reference items for media

* make mapper name more generic

* make default ref item always readonly

* export types

* temp fake variants array

* add variants array to model

* Update media-references-workspace-info-app.element.ts

* add variants to model

* hardcode fake array

* register media ref item

* update mock data

* dot not allow conditions for data mappers

* add data mapper

* prefix info routes

* prefix all ref routes

* return undefined if there is not edit path

* fix name collision

* require data source identifier

* use management api mapper

* add management api mapper

* fix type errors

* Update index.ts

* align naming

* add todo comment

* implement path pattern for media item

* clean up

* more clean up

* sort imports

* member edit path pattern

* clean up

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-20 15:48:02 +01:00
DitteKKoustrupandGitHub 60eb55cefe Add Localization to Document Type - Settings - Vary by Culture and Segments (#18397) 2025-02-20 15:20:49 +01:00
MoleandGitHub ec77b2fa1b Check null in cachevalue for (#18395) 2025-02-20 14:14:57 +01:00
Niels LyngsøandGitHub 54dafd4031 update documentation for a simpler and more clear read (#18381) 2025-02-20 10:55:45 +00:00
Jacob OvergaardandGitHub 7a7602f1bb V15: Update Backoffice NPM dependencies (#18376)
* build(deps-dev): update storybook from 8.4.7 to 8.5.6

* build(deps): update tiptap from 2.11.2 to 2.11.5

* build(deps-dev): update eslint stuff to latest

* build(deps): update element-internals-polyfill from 1.3.12 to 1.3.13

* build(deps): update marked from 15.0.6 to 15.0.7

* build(deps-dev): update vite from 5.4.14 to 6.1.0

* build(deps-dev): update globals to 15.15.0 (eslint dependency)

* build(deps): update icon libraries to latest

* build(deps-dev): update prettier from 3.4.2 to 3.5.1

* chore: generate consts

* build(deps-dev): update test-related libraries

* feat: copy over code from the tiny base64-js library because it is not exported as esm and has not been updated in 4 years

* build(deps-dev): remove dependency from base64-js

* build(deps-dev): upgrade rollup dependencies

* test: disable tests for tinyce

* build(deps-dev): update @babel/core to 7.26.9

* build(deps): update storybook to latest

* build(deps-dev): update types

* build(deps-dev): update typedoc from 0.27.6 to 0.27.7

* build(deps-dev): update @rollup/plugin-commonjs to latest

* build(deps): import tiny as default and re-export as module and default to make everyone happy (and avoid commonjs pitfalls)

* build: remove dependency on commonjs to build externals

* build(deps-dev): uninstall @rollup/plugin-commonjs as it is no longer needed

* test: reenable tinymce tests

* fix: sets a default label

this mistake was highlighted by the test runner

* test: reenable tinymce tests

* build: ignores autogenerated test file

* build: adds github error logging to icon generator

* build: log as error

* build: adds tests for generate:* scripts

* build: optimises icons with svgo to remove useless things like comments

this also ensures that icons are unchanged when we upgrade icon library packages as they would normally include things like versions as comments in the files
2025-02-20 10:29:54 +00:00
Niels LyngsøandGitHub 5401a85828 Feature: Support Handle Selector in Sorter (#18356)
* implement handleSelector configuration option for Sorter Controller

* improve sorting of Content Type Groups

* fix ignorerSelector

* remove button from default ignorer

* block grid type group sorter use handle

* fix content type group sorter style

* handle for Block List Entries

* adjustments for block list and grid
2025-02-20 11:14:58 +01:00
37fd4f6ff6 Toggle property Value labels and validation (#18333)
* localizations

* toggle validation

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-20 09:41:33 +00:00
Sven Geusens 3a9ab25e28 Merge branch 'release/15.2.2' into v15/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/package-lock.json
#	src/Umbraco.Web.UI.Client/package.json
#	version.json
2025-02-20 10:12:31 +01:00
Niels LyngsøandGitHub 59819e0639 use super.value to trigger validation check (#18303) 2025-02-20 09:56:05 +01:00
Niels LyngsøandGitHub 31bbd7ecfc Merge pull request #18224 from umbraco/v15/feature/block-grid-block-type-validation
Feature: block grid block type area/root validation
2025-02-20 09:50:30 +01:00
Niels LyngsøandGitHub edff2c1c8c Chore: Block Manager + Variant ID Polishing (#18321)
* use observablePart()

* methods for variant ID

* move into a gotManager method
2025-02-20 09:35:53 +01:00
Andy Butland a76344ec4c Merge branch 'v15/dev' into v16/dev
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs
2025-02-20 09:33:29 +01:00
Andy ButlandandGitHub b10a11b5b7 Disable webhook firing if disable in configuration. (#18386) 2025-02-19 15:50:08 +01:00
Lee KelleherandGitHub 040d4fe363 Tiptap RTE: Table extension enhancements (#18365)
* Tiptap: Adds custom button for Table

Provides a popover with table menu actions.

* Moved Table extension to its own folder

* Extended the Tiptap `Table` extensions

* Amended table toolbar actions to have `focus()`

* Markup amends

* Fix up Tiptap mock data

* [WIP] Table column/row bubble menu

* Tiptap, enabled content check for invalid markup

* [WIP] Tiptap toolbar cascading menu items

* Tiptap: relocated Block extension

from "plugins" folder to "extensions" subfolder.

* Table toolbar, moved the menu to the API

* `UmbTiptapToolbarElementApiBase`, made `execute` concrete

so that it becomes optional in extended classes.

* Adds "default" toolbar element API

which does nothing, but satisfies the extension loader controller.

* `@ts-ignore` the `.showPopover()` and `.hidePopover()` calls

* Updated Tiptap toolbar mock data-type.data

to match TinyMCE toolbar layout.

* Implemented "Cascading Menu Popover" as a standalone component

* Reworked Table toolbar to use cascading menu

* [WIP] Tiptap bubble menu

* Adds Tiptap Cascading Menu Popover

Example with a Style Select menu, with default (hard coded) options,
similar to TinyMCE's unconfigured Style Select menu.

* Small code tidy ups

* Added "Insert Table" component

* Removed Table Bubble Menu feature (temporarily)

as its development isn't ready yet.

* Removed `umb-tiptap-hover-menu` component

as it wasn't been used.
I expect this will become the bubble menu feature.
2025-02-19 13:00:23 +01:00
Andy ButlandandGitHub 64607ddbaa Disable webhook firing if disable in configuration. (#18383) 2025-02-19 12:17:04 +01:00
leekelleherandJacob Overgaard 28fb7ad67e Refactors loading core Tipap extension
The unit test doesn't register the manifests, so we'll need
to hard code loading the "Rich Text Essentials" extension.
2025-02-19 12:01:22 +01:00
Jacob Overgaard effa40fabb build(deps-dev): update npm dependencies 2025-02-19 09:49:17 +01:00
Andy ButlandandGitHub f389cc9aa3 Modified AspNetCoreRequestAccessor to gracefully handle the absence of an HttpContext (#18369) 2025-02-19 08:46:14 +00:00
Andy ButlandandSven Geusens c198e192da Modified AspNetCoreRequestAccessor to handle absensce of an HttpContext. 2025-02-19 09:18:26 +01:00
Chris HoustonandGitHub ac3b17b390 Fixes the Fatal icon text so it's readable in Dark Mode. (#18375) 2025-02-18 22:00:19 +01:00
Mads RasmussenandGitHub c216d692c2 Feature: Display current variant item name (#18311)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* implement for document item ref

* move logic to item data resolver

* render draft as a tag

* Update document-item-ref.element.ts

* add more helpers to data resolver

* export resolver

* add observables

* use observables in document item ref

* add data resolver to tree item

* add observable state

* use const

* align models

* get icon from document type object

* observe name and state

* update observed value when a new item is set

* update method name

* update method names

* pass model type

* pass context type

* use api prop instead of context

* use api prop instead of context

* fix types

* use addUniquePaths for modal registration

* fix type errors

* Update index.ts

* clean up

* use path pattern
2025-02-18 19:52:05 +01:00
Jacob Overgaard fdebb66fc8 Merge remote-tracking branch 'origin/contrib' into v15/dev 2025-02-18 16:26:27 +01:00
dependabot[bot]andJacob Overgaard 7ac57790ff Bump dompurify from 3.2.3 to 3.2.4 in /src/Umbraco.Web.UI.Login
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 16:08:07 +01:00
leekelleherandJacob Overgaard b3b85b8a6a Adds Tiptap Cascading Menu Popover
Example with a Style Select menu, with default (hard coded) options,
similar to TinyMCE's unconfigured Style Select menu.
2025-02-18 16:07:34 +01:00
Sven Geusens 3a753f4317 Bump version 2025-02-18 13:57:31 +01:00
Andy ButlandandGitHub 96bbed5abf On retrieving other URLs, don't attempt to walk up the navigation structure to find parents when content is trashed. (#18355) 2025-02-18 13:31:40 +01:00
Niels LyngsøandGitHub 04eb94d958 use display contents instead of setting a height (#18363) 2025-02-18 12:20:33 +01:00
Sven Geusens e0d1267f7b Loosen the RTEValue datacontract to improve migrations (#18349) 2025-02-18 11:30:02 +01:00
Sven Geusens fe9ea4766a Merge branch 'release/15.2.1' into v15/dev
# Conflicts:
#	version.json
2025-02-18 11:25:45 +01:00
Sven Geusens a9f9cd7811 Merge branch 'v15/dev' of https://github.com/umbraco/Umbraco-CMS into v15/dev 2025-02-18 11:25:00 +01:00
dependabot[bot]andJacob Overgaard 5c2e4da1ce Bump dompurify from 3.2.3 to 3.2.4 in /src/Umbraco.Web.UI.Client
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 11:12:11 +01:00
leekelleherandJacob Overgaard 9e0614ff74 Tiptap: relocated the Block extension 2025-02-18 11:11:38 +01:00
leekelleherandJacob Overgaard 50b891a79a Updates Tiptap mock data
and story.
2025-02-18 11:11:00 +01:00
Sven Geusens 01fc5998df Merge branch 'v14/dev' into v15/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/FileSystemMainDomLock.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
2025-02-18 11:09:52 +01:00
Andy ButlandandGitHub 82d13b50b6 Limit referenced-by document and media endpoints to references only. (#18354) 2025-02-18 10:04:00 +01:00
Sven Geusens 9e7a36865a Merge branch 'v13/dev' into v14/dev
Revert #18249 as it is reimplemented for v15
Revert #18320 as the new architecture explictly throws an error

# Conflicts:
#	build/azure-pipelines.yml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/IContentService.cs
#	src/Umbraco.Core/Services/MemberService.cs
#	src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Infrastructure/Security/MemberUserStore.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/EntityController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MemberController.cs
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
#	src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilder.BackOfficeAuth.cs
#	src/Umbraco.Web.BackOffice/Filters/ContentSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveModelValidator.cs
#	src/Umbraco.Web.BackOffice/Filters/MemberSaveValidationAttribute.cs
#	src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
#	src/Umbraco.Web.Common/RuntimeMinification/SmidgeOptionsSetup.cs
#	src/Umbraco.Web.Common/RuntimeMinification/SmidgeRuntimeMinifier.cs
#	src/Umbraco.Web.Common/Views/UmbracoViewPage.cs
#	src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbuttongroup.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbtabbedcontent.directive.js
#	src/Umbraco.Web.UI.Client/src/common/directives/components/property/umbproperty.directive.js
#	src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/publicaccess.resource.js
#	src/Umbraco.Web.UI.Client/src/common/resources/users.resource.js
#	src/Umbraco.Web.UI.Client/src/common/services/assets.service.js
#	src/Umbraco.Web.UI.Client/src/views/common/drawers/help/help.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/linkpicker/linkpicker.controller.js
#	src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediaentryeditor/mediaentryeditor.controller.js
#	src/Umbraco.Web.UI.Client/src/views/components/content/umb-tabbed-content.html
#	src/Umbraco.Web.UI.Client/src/views/components/property/umb-property.html
#	src/Umbraco.Web.UI.Client/src/views/content/content.create.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.controller.js
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publishdescendants.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js
#	src/Umbraco.Web.UI.Client/src/views/users/views/user/details.html
#	src/Umbraco.Web.UI.Client/src/views/webhooks/edit.controller.js
#	src/Umbraco.Web.UI.Client/src/views/webhooks/edit.html
#	src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js
#	src/Umbraco.Web.UI.Client~HEAD
#	src/Umbraco.Web.UI.Login/src/auth.element.ts
#	tests/Umbraco.TestData/UmbracoTestDataController.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Core/Services/ContentServiceTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs
#	tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberUserStoreTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/MemberControllerUnitTests.cs
#	version.json
2025-02-17 19:25:45 +01:00
ed63f278c2 V15: Save the variant before scheduling (#18344)
* feat: adds validation checks and saves a version when scheduling content

* chore: adds mock handler for validate

* docs: adds documentation for umbracoPath

* chore: adds deprecation and todos

* feat: adds a method to output a list format

* test: adds test for list format

* feat: rename to list

* feat: adds localization for scheduling

* feat: adds notifications for publishing by action

* test: fixes naming

* feat: adds notification for publishing in bulk

* feat: fixes todo by adding localization

* feat: adds notification when publishing from workspace

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-17 16:31:34 +00:00
Lee KelleherandGitHub e753e2cbf0 Markdown Editor: adds "Default value" support (#18326) 2025-02-17 17:01:41 +01:00
Sven GeusensandGitHub d87a84be14 Loosen the RTEValue datacontract to improve migrations (#18349) 2025-02-17 15:27:22 +01:00
Mads Rasmussen 8bbb12da5a generate server models + fix client 2025-02-17 13:47:02 +01:00
MoleandGitHub c76d764598 V15: Only cache items if all ancestors are published (#18337)
* Introduce IsDocumentPublishedInAnyCulture

Sometimes we don't care about culture

* Check ancestor path when resolving cache items

* Fix tests

* Rebuild NavigationService

* Only set node if it has a published ancestor path

* Remove branch when unpublished

* Add tests

* Add seed test

* Consider published ancestor path when seeding documents

* Introduce MediaBreadthFirstKeyProviderTests

This is needed since the logic of document and media is no longer the same

* Remove unused services

* Move assert page to helper

* Add variant tests

* Add tests

* Filter keys in ContentTypeSeedKeyProvider

* Fix tests

* Add failing test showing refreshing issue

* Don't blow up if we can't resolve the node from navigation cache

Turns out that this can actually happen :D Should be fine to just return false

* Refactor cache refresher check

* Make NavigationQueryService service protected

* Add comment on how to refactor breadth first key provider

* Refactor if statement
2025-02-17 12:51:33 +01:00
Andy ButlandandGitHub db1d999721 Avoid exception when attempting to find member by Id when Id is not an expected Guid or integer, as can be the case with external member providers. (#18320) 2025-02-17 12:47:52 +01:00
Andy ButlandandGitHub 18047a7cfb Only filter post retrieval of entities for start nodes if working with entities that support start nodes. (#18287) 2025-02-17 12:45:51 +01:00
Andy ButlandandGitHub 69e251ad17 Adding additional document collection properties to align model with item response (#18309)
* Added IsTrashed to document collection model.

* Add IsProtected to document collection response model.

* Rework to do setting of IsProtected within the mapper.

* Remove use of service in map definition.

* Refactor document and media by key endpoints to use presentation factories.

* Set IsProtected property.

* Introduced base presentation factory interface for content.
2025-02-17 12:27:53 +01:00
Andy ButlandandGitHub def7ebd48c Html encodes the user's name in the invite email. (#18343) 2025-02-17 12:25:12 +01:00
8f9c8cbaee Allow for multiple backoffice hosts (#18302)
* Allow for multiple backoffice hosts

* Update src/Umbraco.Cms.Api.Management/Security/BackOfficeApplicationManager.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-17 11:49:49 +01:00
89d4563e24 V15: Add a button to clear schedule (#18339)
* chore(mock): adds handling for publishing schedules

* chore: removes unused translation key

* feat: shows a message when a culture has pending changes that are not saved

* feat: optimises pending changes text

* feat(UmbInputDateElement): extends the UUIInputElement rather than using it internally, which allows for more advanced form usage as well as usage of its slots

* feat: adds a Clear button on each date field to more easily clear a schedule

* feat: optimises localization with text from the real button

* Display the remove button if the datetime input has a value

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-17 10:48:40 +00:00
Jacob OvergaardandGitHub a485194228 V15: Show duration on time displays (#18341)
* feat: adds a method to output a list format

* test: adds test for list format

* feat: adds a method to show a compounded relative time

* test: improves test to be absolute

* feat: allows dates to be strings

* chore: fixes lit warnings

* feat: adds compounded time to document info view

* feat: rename to list

* feat: use the Intl.DurationFormat API to format durations

* test: adds test for string dates

* feat: times should always be absolute

* feat: adds duration to the umb-localize-date element

* feat: adds support to set your own title

* revert changes

* feat: adds localization to calculate duration past or future

* feat: adds danish localization
2025-02-17 10:43:53 +00:00
leekelleher a6e8b23e42 Fixes broken stories/test. 2025-02-17 09:26:40 +00:00
Niels LyngsøandGitHub 8bbe0533c3 Close active modal if its begin unregistered (#18285) 2025-02-17 09:11:28 +01:00
Lee KelleherandGitHub 5379fec2d3 Data Type create option description (#18338)
* Added description for Data Type create option

* Updated "create_folderDescription" in English fallback

as it had previously been updated in English US only.

* US to GB typo correction
2025-02-14 15:37:41 +00:00
Andreas ZerbstandGitHub 2ae903ef1b V15 QA fixed failing nightly acceptance tests (#18340)
* Start updates

* Fixed tests

* Another fix

* Bumped version

* Updated pipeline

* Removed and

* Cleaned up
2025-02-14 13:49:14 +00:00
Lee KelleherandGitHub 66cf0874bb Code Editor Modal, adds localization support (#18325) 2025-02-14 08:36:23 +01:00
Lee KelleherandGitHub fe7db00450 Property actions: adds localization support (#18323)
also streamlined the icon render code
2025-02-14 08:35:55 +01:00
Lee KelleherandGitHub b38ef14475 LinkedIn icon, adds currentColor fill (#18322) 2025-02-14 08:35:15 +01:00
leekelleherandJacob Overgaard 2cfc4afdaa Content dashboard, CSS tweaks
To tighten up the info boxes, adds drop-shadow.
2025-02-14 08:34:55 +01:00
leekelleherandJacob Overgaard d023ae3f18 Help Header App, code tidy-up 2025-02-14 08:33:44 +01:00
Lee KelleherandGitHub fde00546e8 Removing the propertyEditorSchemaAlias for "Accepted Upload Types" (#18330)
So that it doesn't show up as an available Property Editor in the list.
2025-02-13 19:24:28 +00:00
ee05e5d779 Removes collection action state (#18212)
* remove collection action state

* clean up

* Update collection-action-button.element.ts

* use ellipsis character

* JSDocs

* TODO note

* add more options

* TODO

* additionalOptions for Collection Actions

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-13 20:19:06 +01:00
Nhu DinhandGitHub 8ea58c13eb Make all smoke tests run in the pipeline (#18316) 2025-02-13 18:55:40 +01:00
d1dc45302b Resolves issues related to the setting of a schedule for content publishing (#17868)
* Render scheduled publish and unpublish on content info workspace view.

* Populate previously saved schedule on set schedule dialog.

* Hide workspace button actions that require a saved document when the document is new.

* Convert between local and server time when saving and displaying schedule.

* Fix issues with clearing of previously set schedule.

* Updated OpenApi.json to align with APi amends.

* Added missing constant.

* Fixes following merge.

* Fixed schedule mapping for invariant content.

* Fixed display of publishing/pending changes on info workspace view.

* Removed debug code.

* fix: adds missing localization keys

fixes #18297

* chore: eslint

* fix: render only the selectAll checkbox when more than one language is present

* feat: adds last edited date

* feat: adds 'last published' date

* fix: format input datetimes to datetime-local

* fix: converts the datetime string to an ISO format before sending to the server

this way we ensure the datetime contains the offset

* chore: adds more types to ensure type safety

* chore: use initialized boolean

* fix: makes schedule modal options-based to isolate the `selection` to the actual values

* docs: fix comment

* docs: adds comment

* fix: use helper function to update selection

* revert commit to prevent breaking change

* chore: eslint

* Whitespace tidy-up

* fix: stores a copy of the prevalues to be able to update that internally before finally setting the value from the updated internal values upon submit

* chore: removes unused function

* fix: unifies any pickable filters into one function

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-13 15:43:58 +00:00
Mads RasmussenandGitHub 3b7a76843a Update picker-search-result-item-element-base.ts (#18308) 2025-02-13 13:41:45 +00:00
Mads RasmussenandGitHub c5303426b0 Feature: Entity Item Ref Extension (#18265)
* wip entity-item-ref extension point

* clean up

* add ref list element

* fix styling

* Update document-item-ref.element.ts

* move item repo

* implement for input member

* enable action slot

* add null check

* fix sorting again

* fix sorting again

* use member element

* add draft styling back

* move item repository

* implement for user input

* pass readonly and standalone props

* make editPath a state

* Update member-item-ref.element.ts

* Fix user item ref

* remove open button

* remove unused

* remove unused

* check for section permission

* add fallback element

* add unique to modal route registration

* add unique to modal router

* remove unused id

* Update member-item-ref.element.ts

* append unique

* compare with old value

* only recreate the controller if the entity type changes

* fix console warning

* use addUniquePaths for modal registration
2025-02-13 11:15:25 +01:00
Andreas ZerbstandGitHub b360762f1f V15 QA disabled SQLite test workers for acceptance tests (#18306)
* Added a parameter that by default skips the sqlite acceptance tests

* Added timeout for flaky test

* Removed continue on error

* Created tests that fails to ensure that the update is working as expected

* Fixed tests
2025-02-13 10:35:05 +01:00
Nhu DinhandGitHub edeac44566 V15 QA Added acceptance tests for Create options (#18314)
* Added tests for document type create option

* Renamed and added tests for document type create options

* Added tests for data type create options

* Added tests for media type create options

* Fixed tests to create media type folder

* Bumped version

* Make all Create option tests run in the pipeline
2025-02-13 16:05:13 +07:00
Niels LyngsøandGitHub a7bd578f56 Prevent saving or publishing not created variants (#18312)
* prevent actions from handling not created variants

* extend pickable filter locally on the modal
2025-02-13 08:54:40 +01:00
Niels LyngsøandGitHub 5f9b192cbf fix peek error circular reference (#18307)
* move error viewer modal

* late import for peek error
2025-02-12 14:34:25 +01:00
8c2b1ebdc5 V13: Introduce publishNotifications method on IMembershipMemberService (#18207)
* Introduce publishNotifications method on IMembershipMemberService.cs

* Fix test

* Add PublishNotificationSaveOptions

* Fix up according to comments

* Use numeric values for flag enum

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

Co-authored-by: Andy Butland <abutland73@gmail.com>

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

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-12 13:30:41 +01:00
Andy ButlandandGitHub 9227517a50 Split force for publish descendants into separate options for publish unpublish and re-publish unedited (13) (#18249)
* Split force for publish descendents into separate options for publish unpublish and re-publish unedited.

* Added integration task verifying updated behaviour.

* Variant integration test.

* Update test data controller.

* Remove usued function parameters.

* Refactor to enum.

* Fixed flags enum.

* Variable name refactor.

* Applied changes from code review.

* Refactored method name.

* Aligned js boolean checks.
2025-02-12 11:30:27 +00:00
Niels LyngsøandGitHub ead29a2567 Merge pull request #18221 from umbraco/v15/feature/block-type-element-not-found
Feature: block type element not found
2025-02-12 12:17:49 +01:00
Andy ButlandandGitHub 59c2205e60 Split force for publish descendants into separate options for publish unpublish and re-publish unedited (15) (#18270)
* Port server-side updates from 13 implementation.

* Update openapi.json

* Update typed client.

* Ported over front-end amend from 13.

* Handled edge case of publishing invariant root with variant descendants.

* Refactor to enum.

* Resolved CodeScene warning.

* Resolved CodeScene warning.

* Resolved CodeScene warning.

* Applied suggestions from code review.

* Reverted breaking change in integration tests.

* Refactored method name.
2025-02-12 12:04:58 +01:00
Niels LyngsøandGitHub ac522aba35 Merge pull request #18172 from umbraco/v15/feature/reworking-error-notifications
Feature: reworking error toast notifications
2025-02-12 11:39:34 +01:00
Mads RasmussenandGitHub db49fb3042 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-12 11:07:34 +01:00
Mads RasmussenandGitHub 64efd73dd8 Update peek-error.controller.ts
remove console log
2025-02-12 11:02:37 +01:00
Niels LyngsøandGitHub 9c621607d4 Fix: #17676 (#18298)
* fix 17676

* localize
2025-02-12 10:53:21 +01:00
Niels LyngsøandGitHub 3d8400302a Feature: workspace action additional options ellipsis (#18299)
* adding types and default kind element

* switch to use ?? for code consistency

* add data-mark

* move listener last

* fix tsc

* save action additionalOptions

* hasAdditionalOptions for Save and Publish

* remove unused import

* type arg

* rename to _retrieveWorkspaceContext
2025-02-12 10:16:12 +01:00
Niels LyngsøandGitHub f906d28de6 Fix: #18272 (#18300)
* only localize if string

* better types of localize string

* test for string update
2025-02-12 09:51:00 +01:00
Andy Butland 5322d0f7b5 Bumped version to 13.8.0-rc. 2025-02-12 08:13:58 +01:00
Andy ButlandandGitHub a282cc5691 Backport use of thread delay over sleep and handle dispose in FileSystemMainDomLock (#18151)
* Backport use of thread delay over sleep and handle dispose in FileSystemMainDomLock (from PRs #18119 and #18147)

* Applied suggestion from code review.
2025-02-12 08:06:50 +01:00
Niels LyngsøandGitHub fdfbd5fc33 Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-11 22:09:35 +01:00
Niels LyngsøandGitHub ac53a6d50f Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-11 22:09:04 +01:00
Niels LyngsøandGitHub ea3e761808 Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation 2025-02-11 22:08:45 +01:00
Andy ButlandandGitHub 048f8bcdf9 Fixed userResource request to get all users. (#18105) 2025-02-11 17:06:18 +01:00
5ee351a6bc Added $type to ReferenceResponseModels (#18293)
* Added $type to ReferenceResponseModels

* Updated OpenApi.json and client-side types.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-11 14:00:07 +00:00
6e20e14542 V15/feature/history cleanup localization (#18295)
* Add localize to headline

* Translate from en to dk

---------

Co-authored-by: Annica <abf@umbraco.dk>
2025-02-11 13:23:59 +00:00
Andreas ZerbstandGitHub 7949a5ba53 V15 QA added clipboard acceptance tests (#18245)
* Added small start for clipboard

* Added more tests

* Added tests

* Added more tests

* More tests

* Bumped version

* Updated tests

* Added tests to run

* Bumped version

* Fixes based on comments

* Reverted npm commands
2025-02-11 13:49:09 +01:00
Andy ButlandandGitHub 7bcbc748d4 URL encodes member user names when passing information for public access setting such that those with user names as emails containing a plus will be included in the rule. (#18142) 2025-02-11 13:36:19 +01:00
Sven GeusensandGitHub 649cfcab58 Custom Partial variancy support for RTE as it uses a wrapped model (#18290) 2025-02-11 12:45:09 +01:00
Zeegaan bb47b7e019 bump version 2025-02-11 12:28:22 +01:00
5457521f19 Fixing the background color of the "re-login" screen when your session has timed out. (#18284)
* Updated modal background color

The background color of the authentication modal has been updated to use a CSS variable for better customization. The default value remains the same.

* Update umb-app-auth-modal.element.ts to use less specific css custom property

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-02-11 09:59:06 +00:00
Jacob OvergaardandGitHub 15cba0afd7 feat: bump minimum required node.js version from 20 to 22 and remove upper limit (#18274) 2025-02-11 08:33:32 +00:00
dependabot[bot]andJacob Overgaard 447b36ab67 Bump vite from 5.4.11 to 5.4.14 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.14/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 09:24:40 +01:00
Andy ButlandandGitHub f30e6cfe7f Prevents folder selection in media picker when used from the multi URL picker. (#18288) 2025-02-11 09:18:01 +01:00
Nhu DinhandGitHub 1663bc4179 V15 QA Added acceptance tests for the content with block list and block grid (#18026)
* Added tests for content with block grid

* Fixed the test for block grid as api helper changes

* Added tests for content with block lists

* Updated tests for content with block grid

* Updated tests for content with block list

* Updated code due to the test helper changes

* Bumped version

* Make all Content tests run in the pipeline

* Reverted

* Make all Content tests run in the pipeline

* Reverted

* Added step to choose element type

* Added more waits

* Fixed failing tests due to UI changes

* Fixed typo

* Fixed typo

* Fixed the failing test

* Bumped version

* Added the tests for move blocks

* Reverted
2025-02-11 13:30:12 +07:00
Lee KelleherandGitHub 3724a45576 Picker search result item icons for Documents and Members (#18250)
* Refactored `UmbDefaultPickerSearchResultItemElement`

Abstracted to `UmbPickerSearchResultItemElementBase` for reuse

* Exported types

* Adds element for 'Umb.PickerSearchResultItem.Document'

to handle the icon (and, in future, the URL/route)

* Adds element for 'Umb.PickerSearchResultItem.Member'

to handle the icon.
2025-02-10 15:38:34 +01:00
Niels LyngsøandGitHub 4d931e55ca Fix: #18209 (#18276)
* first render ones a option is available

* simpler logic
2025-02-10 15:23:36 +01:00
Niels LyngsøandGitHub 37cc67c6d2 use fewer redirects (#18271) 2025-02-10 15:16:50 +01:00
Andy ButlandandGitHub 026e80e026 Avoid an exception on sign out when the principal is populated from an incomplete external login (#18078)
* Avoid an exception on signout when the principal is populated from an incomplete external login.

* Tidied up comment.
2025-02-10 12:51:35 +01:00
Nhu DinhandGitHub 978a068d3c V15 QA Updated acceptance tests for Link Picker (#18231)
* Added tests to ensure that the empty link is not accepted in url picker

* Added tests to ensure that the empty link is not accepted in tiptap

* Updated link picker tests due to UX changes

* Cleaned up

* Make Content tests run in the pipeline

* Added tests for unpublished document

* Fixed comments

* Bumped version

* Cleaned up

* Updated test name

* Reverted

* Bumped version
2025-02-10 17:02:00 +07:00
Andy ButlandandGitHub 8f6d1bc7b8 Add validation to prevent update of a user or member to an invalid username. (#18263)
Avoid password manager updates of user name field on user details screen.
2025-02-10 10:52:41 +01:00
Andy ButlandandGitHub a3b77cff63 Add validation to prevent update of a user or member to an invalid username (13) (#18261)
* Add validation to prevent update of a user or member to an invalid username.

* Avoid password manager updates of user name field on user details screen.
2025-02-10 10:40:53 +01:00
f14922baae Adds name and description to webhooks (#18217)
* Model, service, test and migration updates to add name and description to webhook.

* Update typed client models.

* Fixed migration.

* Front-end rendering and update of name and description.

* Updated OpenApi.json

* Reworked integration tests to avoid breaking change.

* add name and description to editor header

* remove name and description properties

* render name as first column in the table

* remove focus from url

* remove required from name

* add parentheses to align UX

* add webhook paths

* use edit path const in collection

* add paths for root

* remove unused

* remove unused state

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-10 09:23:22 +01:00
25a3788255 V15 QA Fixing the acceptance tests for Create Option due to UI changes (#18262)
* Fixed the tests for creating media type due to UI changes

* Updated tests related to create data type due to UI changes

* Bumped version

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2025-02-10 13:37:24 +07:00
KaritaandGitHub 03690fb330 RTE property editor settings translation for DK&US (#18264) 2025-02-07 15:26:19 +01:00
Niels LyngsøandGitHub ad02cab653 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications 2025-02-07 12:46:29 +01:00
Mads RasmussenandGitHub 6df7ff4322 replace temp event hack with context and skipHost (#18242) 2025-02-07 12:45:49 +01:00
Niels LyngsøandGitHub 4ca68d6995 Add client-side validation for RTE (#18257) 2025-02-07 11:43:04 +00:00
Kenn JacobsenandGitHub 62f46667d2 Remove the hard upper limit for SQL write lock timeout (#18260) 2025-02-07 06:37:11 +00:00
Sven GeusensandGitHub 280cb7f2b1 Fix issues in newly added buttongroup localization (#18254)
* Fix #18253 nullref exception

* Fix #18239 by listening to broader scope changes
2025-02-07 07:00:34 +01:00
KaritaandGitHub 066045f139 Granular permissions translation DK, EN, US (#18251)
* Translation for user permissions DK and EN

* Added UI Culture variants for EN-US user permissions section

* removed redundant line

* improved consistency for wording, and moved keys under user

* Translated granular permissions label and description EN, US, DK
2025-02-07 06:38:12 +01:00
Niels LyngsøandGitHub d27b037d07 Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation 2025-02-06 20:50:02 +01:00
Niels LyngsøandGitHub a639fe07e2 Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-06 20:49:50 +01:00
Niels Lyngsø 1aa177fba1 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts
2025-02-06 20:49:14 +01:00
Niels Lyngsø 460c0b3253 change order of Acceptance Test scripts 2025-02-06 20:48:07 +01:00
Lee KelleherandGitHub deeeaf4107 Creating a Template via a new DocType (#18247)
uses the doc-type name, so that the server
can case it appropriately for the template filename.
re: https://github.com/umbraco/Umbraco-CMS/issues/17458#issuecomment-2639213085
2025-02-06 15:51:00 +01:00
Andy ButlandandGitHub 82fcede59a Management API authorization for requests to rollback. (#18240) 2025-02-06 11:03:07 +01:00
Sven Geusens 57c3279849 Merge branch 'release/15.2' into v15/dev and bump version
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/user/user/conditions/allow-change-password/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/entity-actions/manifests.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/constants.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.repository.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.store.token.ts
#	src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/manifests.ts
#	version.json
2025-02-06 10:39:40 +01:00
Niels LyngsøandGitHub cf8cead8a9 Update README.md (#18238) 2025-02-05 21:26:18 +01:00
Niels LyngsøandGitHub f2944b089a correct manifest (#18237) 2025-02-05 21:23:32 +01:00
fa9ae32a1a Update build and contributing docs (#18223)
* Updates to build and contributing guide.

* Update .github/BUILD.md

Co-authored-by: Sven Geusens <sge@umbraco.dk>

* Add npm ci.

* Apply suggestions from code review

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>

* Update .github/BUILD.md

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-02-05 16:26:53 +01:00
Andy ButlandandGitHub 42e7b37d5d Renamed URL picker document link to content (more familiar to editors). (#18236) 2025-02-05 15:09:28 +00:00
Niels Lyngsø e2fd2afabd mark options as deprecated and avoid lint issue on the argument not used 2025-02-05 15:49:47 +01:00
Lee KelleherandGitHub 664d68e541 Decimal umb-property-editor-ui-number fixes (#18233)
* Numeric: renamed `#parseInt` function to `#parseNumber`

* Numeric: Changed to use `@change` event

* Number input: `max="Infinity"` was invalid markup

We don't need to always set the `min` and `max` attributes.
Leave the browser to do its thing.

* Decimal: adds input `step` config
2025-02-05 15:26:06 +01:00
095a73132c Review: Allow Duplicate Email for Members (#16202)
* init

* Aligned default values on security settings.

* Added validator for security settings.

* Provide default implementation for get members by email.

* Refactored constructor of MemberController.

* Validate on unique member email only when configured to do so.

* Further code tidy and use of DI in constructor.

* Used new constructor in tests.

* Add unit test for modified behaviour.

* Removed validator for security settings (it's not necessary, I got confused with users and members).

* Spelling.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-05 12:38:40 +01:00
KaritaandGitHub cce67b055c Entity permission translation for US, UK and DK (#18225)
* Translation for user permissions DK and EN

* Added UI Culture variants for EN-US user permissions section

* removed redundant line

* improved consistency for wording, and moved keys under user
2025-02-05 10:44:09 +00:00
67a66cb2cc Bugfix: Reload recycle bin on trashed entity (#18228)
* add entity trashed event

* dispatch event when entity is trashed

* remove double event listeners

* export action class

* Update default-tree.context.ts

* wip reload tree when entity is trashed

* move into data folder

* clean up listeners

* move manifest

* wip reload root

* clean up

* add recycle bin tree item

* use for media

* pass entity types through manifest + add recycle bin tree item kind

* remove custom implementation for document recycle bin

* use kind

* rename to supportedEntityTypes

* Update recycle-bin-tree-item.context.ts

* clean up

* Update recycle-bin-tree-item.context.ts

* Update recycle-bin-tree-item.context.ts

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-02-05 08:35:06 +00:00
Niels Lyngsø ec48503b5a style update 2025-02-04 20:38:36 +01:00
Niels Lyngsø c0a215be98 isAllowed impl 2025-02-04 16:32:30 +01:00
Niels Lyngsø acb3f01f69 revert 2025-02-04 16:32:15 +01:00
Niels Lyngsø 00b92d8a57 tsc corrections 2025-02-04 15:15:13 +01:00
Niels Lyngsø c741ba2228 remove responsibility to retrieving block type 2025-02-04 15:13:17 +01:00
Niels Lyngsø 079c77006b Merge branch 'v15/dev' into v15/feature/block-grid-block-type-validation
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
2025-02-04 14:42:10 +01:00
Niels LyngsøandGitHub b4e59de79f Merge branch 'v15/dev' into v15/feature/block-type-element-not-found 2025-02-04 14:40:33 +01:00
Niels Lyngsø cbd17483a1 append error with reload 2025-02-04 14:38:04 +01:00
Niels Lyngsø ce2f50ce59 update status logic 2025-02-04 14:22:52 +01:00
Niels Lyngsø 49c4a60ecf block-type element type not found 2025-02-04 13:48:19 +01:00
Niels Lyngsø c8bdc99662 move prop 2025-02-04 13:46:45 +01:00
Niels Lyngsø c73cc469b6 invalid binding for grid 2025-02-04 13:45:39 +01:00
97046b9546 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/controllers/peek-error/peek-error-notification.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:33 +01:00
cab07ba6f6 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/modals/error-viewer/error-viewer-modal.token.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:25 +01:00
e034a64723 Update src/Umbraco.Web.UI.Client/src/packages/core/notification/extractUmbNotificationColor.function.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-02-04 13:44:18 +01:00
Lee KelleherandGitHub 14b8eee1db RTE TinyMCE: Compares previous value in #onChange event (#18219)
* TinyMCE input: Compares previous value in onChange

Fixes #18132

* Chore: import type ordering
2025-02-04 13:10:17 +01:00
Andy Butland cfb0fc23ac Merge branch 'v13/dev' into v13/contrib 2025-02-04 12:35:49 +01:00
6620aca9fe Cache null dictionary values by key (#15576)
* Add CacheNullValues option to RepositoryCachePolicy

* Cache null values in DictionaryByKeyRepository

* Fixed issue with nullable reference.

* Updated logic for caching of null values.

* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Made the NullValueRepresentation overwritable in a generic manner

* Improve generic NullValueCachePolicyResolver

* Revert Commits and clarify logic with comment

This reverts commit 8befb43792 "Improve generic NullValueCachePolicyResolver"
Also reverts 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
And 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner

* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
2025-02-04 12:29:21 +01:00
Mads RasmussenandGitHub 9c5768e1ab Deprecate get unique param on UmbPickerInputContext and UmbRepositoryItemsManager (#18216)
* Add a deprecation warning for the getUnique param

* fix import

* add specific version number

* remove block usage

* remove input rich media usage

* explicit version

* deprecate getUnique method in picker context

* remove get unique method
2025-02-04 12:18:35 +01:00
2422a02b23 Set Smidge cachebuster type (#18198)
* Set Smidge cachebuster type

* Amend exception and fix typo

* Minor tweak to comment and exception message.

---------

Co-authored-by: Simon Hartfield <simon.hartfield@googlemail.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-04 11:00:44 +00:00
Nhu DinhandGitHub 52aa18c7d1 V15 QA Added acceptance tests to verify the SVG thumbnail (#17966)
* Added tests to verify the media thumbnail

* Added tests to verify the media thumbnail

* Bumped version

* Make the SVG tests run in the pipeline

* Cleaned code

* Updated smokeTest command

* Reverted

* Updated the thumbnail file for audio

* Reverted
2025-02-04 13:37:44 +07:00
1c68e3d825 Added deliveries workspace view to the webhook details workspace (#18175)
* Added deliveries workspace view to the webhook details workspace.

* Front-end linting fixes.

* rename to unique

* update filter value

* make delivery feature folder

* move delivery workspace view for delivery feature folder

* correct details workspace view label and pathname to match name

* remove unused alias

* use singular form to align naming

* remove pagination as the default collection kind already includes this

* show icon

* remove double registration

* add observables for webhook data, add get methods + add jsdocs

* align UX with languages

* remove hardcoded fake name + make url the link

* remove redundant url in table

* render status code as tag

* use tags for enabled/disabled webhook state to align with users

* make the name more explicit

* move webhook root to a feature folder

* export consts

* fix webhook collection pagination

* move menu item manifests into root folder

* move webhook delivery filering responsibility from repo to workspace view

* reorganize

* move workspace

* fix import

* move entity actions

* export delivery consts

* dot not export const

* rename folder

* update name

* make event feature folder

* export consts

* move repository files

* more clean up

* split types

* add deprecation warning for a temp method

* bring back url to deliveries table

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-02-04 06:36:38 +01:00
b4a9dc0770 V13: Fix members while using basic auth. (#18206)
* Flow additional identities to new principal

* Add extension to more easily get member identity

* Ensure the member is used instead of the backoffice user in `MemberManager`

* Update snippet

* Fix the comment that I broke

* Update src/Umbraco.Web.Common/Extensions/MemberClaimsPrincipalExtensions.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-02-03 19:48:08 +01:00
Niels LyngsøandGitHub deca4c8916 Merge pull request #18182 from umbraco/v15/bugfix/18000
Fix: Unsupported Block (18000)
2025-02-03 19:21:38 +01:00
6aaa9d8081 Corrected rendering of member type icons on create button and picker (#18203)
* Corrected rendering of member type icons on create button and picker.

* Removed debug code.

* Member Picker: sets icon

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 17:10:08 +00:00
Niels LyngsøandGitHub ee51f2af5b Merge pull request #18194 from umbraco/v15/bugfix/17206
Fix: 17206
2025-02-03 18:05:19 +01:00
fc8ae20e70 Localize reference block labels and properties in the block editing experience (#18201)
* Localize reference block labels and properties in the block editing experience.

* Revert description update.

* Block entry: localize content-type name

* Block entry: localize delete confirm modal

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 16:44:15 +00:00
1f4b3e2599 V15: Add progress UI to the Upload Field property editor (#18188)
* feat: uses a blob url over a FileReader to get the temporary file's blob and mimetype

* feat: adds styling to temporary file badge

* use correct styling

* feat: adds uploader ui to track progress of uploaded files

* chore: check for potentially undefined promises

* feat: adds an `AbortSignal` to the xhr requests to allow for the request to be aborted

* feat: adds an `AbortSignal` through the stack to upload a file

* feat: cancel the ongoing request if the user removes the file during an upload

* Code/markup tidy-up

Added "Cancel" button, from @bjarnef's suggestion.

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 15:44:00 +00:00
Mads RasmussenandGitHub 1e5bfd8c3a Feature: Media Type Create Options (#18196)
* use extension point for media type create options

* register collection action
2025-02-03 15:42:02 +00:00
Niels Lyngsø 81be464dae added comment 2025-02-03 16:22:50 +01:00
Niels Lyngsø ebad05aa4c validation for Block Type Configurations 2025-02-03 16:22:14 +01:00
Niels LyngsøandGitHub 02b3ec40ab Merge branch 'v15/dev' into v15/bugfix/18000 2025-02-03 15:49:30 +01:00
Jacob Welander JensenandGitHub 058f901293 V15/feature/toggle property editor UI (#18171)
* update the setting for the toggle satet

* update the setting for the toggle satet

* adds a fallback label if no ariaLabel is set in the manifest, using toggleFor
2025-02-03 15:48:34 +01:00
f1cdf50cdd V15: Show server configuration when configuring the Upload Field (#18185)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional

* feat: adds repository+store for temporary file configuration

* chore(mock): adds mock endpoint for temporary file configuration

* feat: set progress for createTemporaryFiles

* feat: allows a `whitespace` option to notifications

* feat: validates uploads before trying to query the server

* feat: adds `formatBytes` function to format numbers

* chore: export all consts

* feat: exports bytes function

* feat: set decimals to default to 2, which works nicely with the Intl numberformat

* feat: use `formatBytes` to format the error message

* chore(mock): set max file size for mock to 1.4 GB

* feat: adds localization

* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/bytes/bytes.function.ts

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>

* chore: add end character to comment

* feat: binds multiple text string to validation

* chore: fixes event type

* feat: adds new property editor ui for accepted file types

* feat: changes the upload field to use the property editor ui for accepted file types

* adds localization

* Markup/style refactoring/streamlining

* Renamed "Accepted Types" to "Accepted Upload Types"

---------

Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-02-03 13:57:55 +00:00
Andy ButlandandGitHub e7411244fd Show notifications menu only to users with permission for the feature. (#18184) 2025-02-03 13:24:58 +01:00
Lee KelleherandGitHub ee231c7bae Corrects filename label on the Upload File component (#18205)
* Corrects input upload filename label

Fixes #18195

* Refactored input upload file code
2025-02-03 12:12:19 +00:00
Kenn JacobsenandGitHub 9f357173c3 Enforce user start nodes for media uploads through the RTE (#18204) 2025-02-03 12:50:23 +01:00
Niels Lyngsø 13bcf16644 revert 2025-01-31 21:31:36 +01:00
Niels Lyngsø 89219d8327 Revert "no need to run validators when we already do so on update"
This reverts commit 23659061a2.
2025-01-31 21:30:43 +01:00
Niels Lyngsø 0ae33f8cbc Revert "Reapply "correct initial value set and remove private version""
This reverts commit 317cc5c6f1.
2025-01-31 21:30:13 +01:00
Niels Lyngsø 317cc5c6f1 Reapply "correct initial value set and remove private version"
This reverts commit ce7c6e010d.
2025-01-31 21:29:16 +01:00
Niels Lyngsø ce7c6e010d Revert "correct initial value set and remove private version"
This reverts commit 09072b6946.
2025-01-31 21:28:28 +01:00
Niels LyngsøandGitHub 40f671dca6 Merge branch 'v15/dev' into v15/bugfix/18000 2025-01-31 21:26:37 +01:00
Jacob OvergaardandGitHub 2cdcacb9a8 V15/feature/notification-whitespace (#18190)
* feat: adds `white-space: pre-line` to all notification messages

* chore: remove invalid values
2025-01-31 21:26:19 +01:00
Niels Lyngsø 2fe2b46670 communicate with console error if it fails 2025-01-31 21:17:45 +01:00
Niels Lyngsø 09072b6946 correct initial value set and remove private version 2025-01-31 21:13:09 +01:00
Niels Lyngsø 23659061a2 no need to run validators when we already do so on update 2025-01-31 21:11:14 +01:00
Niels Lyngsø ae540f66d3 correcting logic 2025-01-31 21:06:07 +01:00
Niels Lyngsø 0b7ed5d6f9 make sure to trigger validation system by using super.value 2025-01-31 20:37:16 +01:00
Andy Butland 3157601724 Merge branch 'v15/dev' into contrib 2025-01-31 16:17:43 +01:00
Andy Butland 7dc6e3ed5b Merge branch 'v13/dev' into v13/contrib 2025-01-31 16:16:22 +01:00
09b3bd14c0 v14: Async healthchecks (#17090)
* Make block editor base classes public

* Update BlockEditorValues.cs

Change to trigger a new build for #16774

* Make healthchecks fully async

* Updated obsolete comments to reference next but one major.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 16:13:49 +01:00
def9bd096f Less parsing, allocation & LINQ when splitting strings (#18048)
* Less parsing, allocation & LINQ when splitting strings

* Added unit test verifying refactoring of GetIdsFromPathReversed.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 14:22:57 +00:00
Gareth WrightandGitHub 5dfff212d0 Update auth.element.ts (#18192)
auth_username => general_username
2025-01-31 14:59:25 +01:00
17615f966b Fix out of memory of 2gb+ (max 4gb) error introduced by #14657 SVG xss security fix (#17421)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-31 13:46:56 +00:00
Kenn JacobsenandGitHub 7a2d6b6c63 More robust resolving of Delivery API redirects (#18160) 2025-01-31 14:26:07 +01:00
3829b0963f V15/sort by selected icons (#18158)
* adds back the custom icon for the content nodes and give a hover effect to indicate that it is grabable, and applys the choosen color

* Update sort-children-of-modal.element.ts

* switches to use the umb-icon and updates styling

* removes the backoffice host

* Update appsettings.Development.template.json

* Update sort-children-of-modal.element.ts

* Update sort-children-of-modal.element.ts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-31 13:09:55 +00:00
Lee KelleherandGitHub 9323d8b0e7 Introduces getStyles() for Tiptap extensions (#18075) 2025-01-31 13:24:12 +01:00
85a81b3d6f Ensure min/max property editor settings are valid before rendering for content editing (#17881)
* Ensure min/max property editor settings are valid before rendering for content editing.

* Display message when URL picker data type configuration is not valid.

* Reverted 'umb-input-multi-url' changes

* Added console warnings for misconfigured min/max values

Also adds `label` property for UUI elements

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-31 13:23:14 +01:00
Lee KelleherandGitHub bb755188b5 User Group picker modal: adds filter input (#18159)
Fixes #16452.
2025-01-31 13:20:55 +01:00
Niels LyngsøandGitHub 7c5c3fd2d8 Merge pull request #18154 from umbraco/v15/feature/enable-document-rollback-as-entity-action
Rollback as entity action + Picker data updates
2025-01-31 12:59:58 +01:00
Niels LyngsøandGitHub 0480a3287f Merge pull request #18189 from umbraco/v15/bugfix/range-input-simpler-infinite-max-indication
ensure default in Infinity
2025-01-31 12:54:15 +01:00
Niels LyngsøandGitHub 341534c5de Merge pull request #18162 from umbraco/v15/feature/hide-icons
Feature: hide icons
2025-01-31 12:40:16 +01:00
Niels LyngsøandGitHub 9896119b8e Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-31 12:28:43 +01:00
Niels Lyngsø da3bc9a6a8 no more need for a max 2025-01-31 12:15:31 +01:00
Mads Rasmussen a2378e6b5f use unique instead of discriminator 2025-01-31 12:15:10 +01:00
Niels Lyngsø f155369540 ensure default in Infinity 2025-01-31 12:13:15 +01:00
Kenn JacobsenandGitHub 50ff23b661 Don't assume HtmlString when inserting default values in templates (#18144) 2025-01-31 11:19:33 +01:00
Niels LyngsøandGitHub 30c4408f18 Merge pull request #18014 from umbraco/v15/feature/workspace-info-app-extension
Feature: workspace info app extension
2025-01-31 11:11:48 +01:00
HenrikandGitHub c64ec51305 Nonbreaking performance tweaks (#17106)
* Avoid doing multiple lookups in dictionaries, avoid doing string interpolation & adding single char strings to a StringBuilder, made some private/internal classes & some private methods static when possible, use FrozenSet for InvalidFileNameChars

* Avoid some array + list allocations & async methods and made some private methods static

* Avoid double lookup of XML attribute (and double null check) & avoid an unneeded lookup before writing to a dictionary

* Avoid some double lookups

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Avoid double lookups

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Avoid double lookups

* List AsSpan, also to trigger a new build that hopefully goes through

* Avoid concatting strings when using writer & more static

* Updated CollectionBenchmarks to show that ToArray isn't always the fastest & Lists can be iterated nearly as fast as arrays (and that ToList is nearly as fast as ToArray on IReadOnlyLists in .NET 8)

* Fix rebase

* Use explicit types ❤️ (I thought it was the other way round...)

# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextService.cs

* Reduce number of lines in HtmlStringUtilities.Truncate to pass code quality analysis

* Avoid double lookups & allocating empty arrays

* Use native List Find instead of LINQ
2025-01-31 10:31:06 +01:00
Niels Lyngsø 412fe69a36 lint fixes 2025-01-31 10:13:38 +01:00
Niels LyngsøandGitHub 8219d1d8c1 Merge branch 'v15/dev' into v15/bugfix/18000 2025-01-31 10:03:02 +01:00
Mads Rasmussen dab3977ebf Update index.ts 2025-01-31 09:27:38 +01:00
Mads Rasmussen 6c618ff9ec Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-31 09:26:46 +01:00
Andreas ZerbstandGitHub c448190e0b V15 QA added fixes for flaky/failing acceptance tests (#18149)
* Fixed tests

* More fixes

* More fixes

* Skipped waits

* Added necessary updates to tests

* Bumped versions

* Removed skipped waits

* Removed more waits

* Cleaned up PR

* Updated tests

* Bumped version

* Added more timeout
2025-01-31 08:58:15 +01:00
Niels Lyngsø 11e2614fe5 unsupported block list 2025-01-30 22:33:14 +01:00
Niels Lyngsø 1f494939ca Block Grid unsupported block 2025-01-30 21:55:30 +01:00
Andy ButlandandGitHub 739a24b8c5 Fixed name of True/False property editor schema manifest. (#18179) 2025-01-30 20:02:51 +00:00
Mads Rasmussen 357128151c remove unused 2025-01-30 17:03:30 +01:00
Mads Rasmussen 54e4a26d77 update consts 2025-01-30 17:02:13 +01:00
Sven Geusens 343867f6ee Merge branch 'release/13.6' into v13/dev and version bump
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/PreviewController.cs
#	version.json
2025-01-30 16:27:49 +01:00
MoleandGitHub 6668f3a867 V15: Add authorization to create (#18169)
* Add failing tests

* Re-add auth
2025-01-30 16:00:33 +01:00
Mads Rasmussen 4aae502572 add layout element 2025-01-30 14:57:40 +01:00
Niels LyngsøandGitHub c1f74f4aab Merge pull request #18094 from umbraco/v15/bugfix/offline-notifcation
Bugfix: show notification when offline
2025-01-30 14:51:53 +01:00
Niels Lyngsø d1fa73c462 Merge branch 'v15/dev' into v15/feature/reworking-error-notifications
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts
2025-01-30 14:22:01 +01:00
Mads Rasmussen b840fec228 wrap in layout element 2025-01-30 14:19:19 +01:00
Mads Rasmussen 5e7065b7db add layout element 2025-01-30 14:18:35 +01:00
Niels Lyngsø 69e36a3b94 fix json display 2025-01-30 14:15:44 +01:00
Niels Lyngsø 32a2bab4f0 todo 2025-01-30 14:15:32 +01:00
Bjarke BergandSven Geusens b9837ac77c Optimize Azure pipeline (#17674)
* Only fetch single commit

* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.

* Do not checkout again

* More test pipeline

* Another attempt

* yet another attempt

* more attempts

* Revert "more attempts"

This reverts commit 5694d97ba6.

* Test without building backoffice and login explicitly

* Fix mem leak in integration tests

* Fixes sqlserver lock test
# Conflicts:
#	build/azure-pipelines.yml
2025-01-30 14:10:05 +01:00
Niels Lyngsø 2ca4e0e1bd remove max-height setting from code-block 2025-01-30 14:01:51 +01:00
Niels Lyngsø 7d703cc9bd peek error modal 2025-01-30 14:01:31 +01:00
Niels Lyngsø 6f9e66de8a localizations 2025-01-30 14:00:27 +01:00
Jacob OvergaardandGitHub 22d974e748 V15: Client should validate maxFileSize and allowed/disallowed file types from server configuration (#18163)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional

* feat: adds repository+store for temporary file configuration

* chore(mock): adds mock endpoint for temporary file configuration

* feat: set progress for createTemporaryFiles

* feat: allows a `whitespace` option to notifications

* feat: validates uploads before trying to query the server

* feat: adds `formatBytes` function to format numbers

* chore: export all consts

* feat: exports bytes function

* feat: set decimals to default to 2, which works nicely with the Intl numberformat

* feat: use `formatBytes` to format the error message

* chore(mock): set max file size for mock to 1.4 GB

* feat: adds localization
2025-01-30 12:54:17 +00:00
Sven Geusens bb73ec6c68 Set release version 2025-01-30 09:52:50 +01:00
Niels Lyngsø 0006a9bd87 peek error notification element + controller/method 2025-01-29 22:59:40 +01:00
Andy ButlandandGitHub ee2d7bbb1b Excluded tags from trashed content (#18164) 2025-01-29 21:10:11 +01:00
Mads Rasmussen b4f80fda42 Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-29 19:47:30 +01:00
Niels LyngsøandGitHub e124ce91cb Merge branch 'v15/dev' into v15/feature/hide-icons 2025-01-29 14:02:05 +01:00
MoleandGitHub 1752be989d V15: Fix Url Preview (#18072)
* Make URL overview align with the old routing

This means including custom url providers, other URLS, etc.

* Move implementation to its own provider

* Handle could not get url

* Migrate intergration tests to new implementation
2025-01-29 13:59:58 +01:00
Niels Lyngsø e05eb849c0 update script + remove empty lines 2025-01-29 13:59:54 +01:00
Niels Lyngsø 7cd1c75845 deprecation note 2025-01-29 13:56:29 +01:00
Niels Lyngsø 638eef03a1 update icons 2025-01-29 13:55:07 +01:00
Niels Lyngsø fccd203bdc refactor to use hidden as the property for legacy and internal icons 2025-01-29 13:55:01 +01:00
Andy ButlandandGitHub 5d48bc7371 Provides an option to remove the inessential version number from the generated models (#18081)
* Provides an option to remove the inessential version number from the generated models.

* Clarified comment.
2025-01-29 13:33:49 +01:00
Jason ElkinandGitHub 55b5d7eecd Fix task return and apply correct disposal pattern for FileSystemMainDomLock (#18147) 2025-01-29 12:13:50 +00:00
Jacob OvergaardandGitHub ab98ea58b5 V15: Show upload progress for dropped files in the Media Library (#18148)
* feat: shows notification when no suitable media type is found

* chore: rearrange imports

* feat: use a forward ref to find the dropzone

* chore: rearrange imports

* chore(mock): send back correct header

* feat: avoid using the context consumer to get a token, but instead mimick the OpenAPI generator

* chore(mock): allow more file types

* chore(mock): create more upload fields

* chore(mock): also look for mediaPicker fields

* chore(mock): improve media mock db

* chore(mock): add missing endpoints

* chore(mock): update media data

* chore(mock): fix aliases for media grid and table

* chore(mock): add urls to media

* chore(mock): adds missing endpoint for imaging

* fix: reverse order of properties to overwrite existing status

* feat: listen to progress updates on upload and update the `progress` property

* feat: adds tracking of upload progress to placeholders

* feat: bind the progress number up on the temporary file badge to indicate upload status

* feat: optimises progress calculation and makes the badge bigger to be able to show the progress in percent

* feat: allow text to be normal

* chore: use correct localization

* feat: shows error status for anything that isn't waiting or complete

* feat: makes `progress` optional
2025-01-29 11:02:29 +00:00
Mads Rasmussen 0a8ac3b2a4 Merge branch 'v15/feature/enable-document-rollback-as-entity-action' of https://github.com/umbraco/Umbraco-CMS into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 11:16:56 +01:00
Mads Rasmussen 99cb36b29d remove unused 2025-01-29 11:16:54 +01:00
Mads RasmussenandGitHub 7f8a4ab8c5 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 11:08:04 +01:00
Kenn JacobsenandGitHub 59a4649528 Do not allow editing read-only properties by clicking their labels (#18152)
* Do not allow editing read-only properties by clicking their labels

* Simplify the fix :)

* Fix linting issue
2025-01-29 10:29:58 +01:00
Andy ButlandandGitHub f54b6033ab Added Resharper test assemblies to exclude list on TypeFinder. (#18145) 2025-01-29 10:27:17 +01:00
Andy ButlandandGitHub bca74e0277 Pass user Id to audit when saving and deleting members. (#18120) 2025-01-29 10:14:34 +01:00
Mads RasmussenandGitHub 1e50714d1b Set document to readonly when a user is not allowed to create / update (#18076)
* split manifest file

* use const

* use const

* use const

* require permission to create or update to render save action

* require permission to update to render "save and preview"

* require permission to update + publish to render "save and publish"

* keep button as it is extendable

* keep buttons as they are extendable

* set readonly state based on user permission

* render readonly tag for invariant documents

* remove double array

* return permitted state in callback

* disable save button if all variants are read only

* rename private method

* split check on create vs update

* clear state when resetting the state

* add null check

* remove unused

* Update document-user-permission.condition.ts

* change translation to browse

* remove create permission
2025-01-29 09:06:58 +00:00
Mads Rasmussen 6b94a20043 dispatch event from detail-workspace-base 2025-01-29 10:05:36 +01:00
Mads Rasmussen 0b5e760fd5 correct name 2025-01-29 10:04:57 +01:00
469fd14aff Bugfix: Content Picker Search - support allowed content types config (#18042)
* add option to interface

* pass config to picker

* add option to interface

* force type

* add request args to type

* pass allowed content types as request args

* add comments

* allow for passing type

* more type safety

* use correct types

* use correct types

* add js docs

* remove debugger + map to only pass id to server

* add js docs

* align naming

* add null check

* align types

* implement allowedContentTypes for member search

* fix imports

* add types for media search

* add and use const

* align picker interfaces

* align models

* add entity type

* filter for null value

* explicit naming

* rename field

* use query params

* Implement content type scoped search in item search controllers

* Fix bad naming

* generate server models

* wire up backend

* generate server models

* add selectable filter to member picker

* Update member-picker-modal.element.ts

* Fix indexed search for specific member and media types

* export consts

---------

Co-authored-by: kjac <kja@umbraco.dk>
2025-01-29 08:23:32 +00:00
Mads Rasmussen 017777f8a4 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-29 08:00:12 +01:00
Andy ButlandandGitHub ad45494aa5 Fixes rollback of variant page name. (#18136) 2025-01-29 07:50:48 +01:00
Jacob OvergaardandGitHub e77bac3088 V16: Allow MaxRequestLength to be specified as a long (#18141)
* feat: allows MaxFileSize to be specified as 64-bit rather than 32-bit to be able to accept larger files

the underlying kestrel architecture already accepts a `long` in ConfigureKestrelServerOptions.cs

* chore: removes unused configuration option

* chore: generate OpenApi.json
2025-01-29 06:31:24 +01:00
Andy Butland c8856bcf22 Obsolete unused configuration property. 2025-01-29 06:30:07 +01:00
Mads Rasmussen 675e9ab17f Merge branch 'v15/dev' into v15/bugfix/offline-notifcation 2025-01-28 18:32:30 +01:00
Mads Rasmussen 633cce5fd8 show online notification 2025-01-28 18:31:41 +01:00
Mads Rasmussen 08a621b117 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-28 18:10:08 +01:00
Mads Rasmussen aa5c58f753 use reload 2025-01-28 17:15:27 +01:00
Mads Rasmussen e6cc9cfc6c reload items 2025-01-28 14:59:59 +01:00
Mads Rasmussen 4ff07d3556 remove unused 2025-01-28 14:48:05 +01:00
Mads Rasmussen ee1dff2e50 Update rollback-modal.element.ts 2025-01-28 14:34:41 +01:00
Mads Rasmussen ff71caf5a3 Update index.ts 2025-01-28 14:29:30 +01:00
Mads Rasmussen 15342ea2bc remove detail from event 2025-01-28 14:28:39 +01:00
Mads Rasmussen fc55f5eb7f listen to events on entity updates 2025-01-28 14:25:26 +01:00
Mads Rasmussen 7ac2fff839 dispatch event when content is saved 2025-01-28 14:24:57 +01:00
Mads Rasmussen 0a78648175 add event discriminator option 2025-01-28 14:04:35 +01:00
Mads Rasmussen 80b8d6f89f remove from document workspace 2025-01-28 13:40:32 +01:00
Jacob OvergaardandGitHub bf340cd7d4 fix: remove unused parameters and documentation (#18095)
this fixes an issue where unused parameters were published as supported, but they were in fact never supported.
2025-01-28 10:53:00 +00:00
Andy Butland 313417cb91 Tidied up XML header comment in ITagQuery. 2025-01-28 10:52:21 +01:00
Jacob Overgaard 27afb3f0f3 Merge branch 'v15/dev' into v16/dev 2025-01-28 10:29:30 +01:00
Niels LyngsøandGitHub f2b337a0be Merge pull request #18109 from umbraco/v15/bugfix/media-picker-mandatory-validation
Fix: media picker mandatory validation
2025-01-28 10:26:10 +01:00
Niels LyngsøandGitHub c4ab3bd8e9 Merge pull request #18108 from umbraco/v15/bugfix/17372
Fix: Mandatory for Image Cropper (17372)
2025-01-28 10:13:41 +01:00
Andy ButlandandGitHub f1e69dd16e Added a check that we have a route before attempting to include it in the other URLs for a published document. (#18135) 2025-01-28 10:10:08 +01:00
Jacob OvergaardandGitHub ea63d08989 V15: Media library crashes when uploading large files (#18113)
* chore(mock): adds endpoint handler for allowed media types

* feat: adds new event `UmbDropzoneSubmittedEvent`

* fix: do not await unnecessarily

* fix: simplify error checking

* fix: only proceed if array contains elements

* feat: adds support to render an error state

* fix: react to error state on temporary file badges

* fix: cancel events and simplify error check and react to any status changes

* feat: adds new tryXhrRequest function

* fix: use tryXhrRequest to upload all temporary files

* fix: use error types from hey-api as a temporary solution

* fix: changes limit from int32 to long (64-bit) to allow larger files to be uploaded

* fix: set default baseURL

* fix: use same unique

* fix: do not overwrite status

* fix: adds progress callback for tinymce

* generate openapi.json

* Revert "generate openapi.json"

This reverts commit 3c723e0155.

* Revert "fix: changes limit from int32 to long (64-bit) to allow larger files to be uploaded"

This reverts commit c883a45508.

* chore: generate OpenApi.json
2025-01-28 08:50:43 +00:00
Niels Lyngsø f7f0891d3b remove nothing import 2025-01-28 09:26:07 +01:00
Niels LyngsøandGitHub eeafb3cbc6 Merge pull request #18092 from umbraco/v15/feature/reject-validation-promise
Feature: Clean up validation messages
2025-01-28 09:23:03 +01:00
Niels LyngsøandGitHub c72fa4866b Merge branch 'v15/dev' into v15/bugfix/media-picker-mandatory-validation 2025-01-28 09:14:29 +01:00
Niels Lyngsø 424eef4c93 fix min validation check + emptying cards 2025-01-28 08:50:35 +01:00
Andy ButlandandJacob Overgaard 151e0a89fb Refreshed display of check results after all checks are complete. 2025-01-28 08:45:42 +01:00
Niels Lyngsø 2755372f46 Merge branch 'v15/dev' into v15/bugfix/17372 2025-01-28 08:15:48 +01:00
Niels Lyngsø 677a8594df only check valueMissing if required 2025-01-28 08:15:07 +01:00
Mads Rasmussen bf5caf6aea disable submit button until a version is selected 2025-01-27 21:53:47 +01:00
Mads Rasmussen 11800845e2 render empty states 2025-01-27 21:46:52 +01:00
Mads Rasmussen 77f6ac87c6 submit modal 2025-01-27 15:50:55 +01:00
Mads Rasmussen 1048234d80 reload workspace on entity detail updated event 2025-01-27 15:45:19 +01:00
Mads Rasmussen a68ff52bae change weight 2025-01-27 14:13:51 +01:00
Mads Rasmussen eda13964c9 Update rollback-modal.element.ts
hide box if there are no cultures
2025-01-27 14:13:43 +01:00
Mads Rasmussen d343ab3bce styling adjustments 2025-01-27 14:06:17 +01:00
Mads Rasmussen 7e68573628 support invariant documents 2025-01-27 13:51:33 +01:00
Lee KelleherandGitHub d90002247d Feature: Tiptap: Generic markup support (#18124)
* Adds "HTML Global Attributes" Tiptap extension

This is to add `class`, `id` and `data-*` attributes
to any markup within Tiptap contents.

* Adds "Span" element Tiptap extension

to support generic markup modifications.

* Adds "Div" element Tiptap extension

to support generic markup modifications.

Also modifies "umbEmbeddedMedia" to check explicitly
for the `umb-embed-holder` class name. This is to differentiate
from the generic `div` tag.

* Adds "Rich Text Essentials" Tiptap extension

Previously this was a faux extension, but it is now real.

This extension adds the core extensions for Umbraco RTE support.
e.g. StarterKit, et al, and the new global attributes and generic elements.

* Reverts `elementName` constant
2025-01-27 12:29:44 +00:00
Mads Rasmussen 43005c72db extract logic from rendering 2025-01-27 13:02:50 +01:00
Mads Rasmussen 4988162b36 update naming 2025-01-27 12:53:12 +01:00
Mads Rasmussen 6d31a0ae6c get name from language 2025-01-27 12:39:39 +01:00
Mads Rasmussen 01eed53d42 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-27 12:23:30 +01:00
Mads RasmussenandGitHub 1e89b5a1e0 Bugfix: Align collection item entity actions with menu item entity actions (#18118) 2025-01-27 12:03:09 +01:00
Lee KelleherandGitHub 8f212aec3b Feature: Code Editor modal, adds pretty-print support (#18123)
* Reverts `elementName` constant

* Adds `formatOnLoad` option

* Code editor modal markup tidyup

* Wires up `formatOnLoad` with Tiptap's view-source action
2025-01-27 11:57:32 +01:00
bc3881707e updated the link picker modal and the property editors using it. (#18059)
* updated the link picker modal and the property editors using it.

* updated the last language

* some minor updates to the code so that it uses the correct actions

* Minor change in the language key that is being used.

* use camel case

* use "add" and "update" without "link"

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-27 09:49:02 +00:00
2648d17cb6 Updated the dialog label for User -> Assign Access -> Media Start nodes (#18043)
* Updated the dialog label User - Assign Access - Media Start nodes

* Minor change to the modal headline

* update based on review.

* updated the languages based on review

* updated based on review

* Small update based on review on PR

* use generic choose media for the media dialog

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-01-27 09:45:22 +00:00
Jason ElkinandGitHub 1395d498b7 Use Task Delay instead of Thread.Sleep (#18119) 2025-01-27 09:36:02 +00:00
Mads Rasmussen 719f50024f Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-25 12:50:38 +01:00
Mads Rasmussen d636bba451 Merge branch 'v15/dev' into v15/feature/enable-document-rollback-as-entity-action 2025-01-25 12:50:03 +01:00
Niels LyngsøandGitHub 380492145b remove sidebar padding bottom (#18087) 2025-01-24 22:35:17 +01:00
Niels LyngsøandGitHub 9c02fb419f implement with empty path instead of redirect (#18112) 2025-01-24 22:32:10 +01:00
Mads Rasmussen 55141df271 Update en.ts 2025-01-24 21:44:25 +01:00
7850078623 Redirect to the published URL when exiting preview (#18114)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 18:46:28 +00:00
44bf3b77b3 Make it possible to reset media picker crops (#18110)
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 13:41:30 +00:00
c9758edfb1 V15: Add authorization to saves (#18111)
* Re-add authorization

* Add test plumbing

* Add test helper

* Add happy path test

* Remove usage of negation

* Minor DRYup of test code.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-24 13:45:56 +01:00
Niels Lyngsø e6785d3223 media picker validation 2025-01-24 11:37:26 +01:00
Niels Lyngsø c6c7d043dd implement focus for content picker 2025-01-24 11:37:11 +01:00
Niels Lyngsø 517f3c909c no need to set pristine cause it begin done by checkValidity 2025-01-24 11:37:00 +01:00
Niels Lyngsø fb3609db0a allow for undefined 2025-01-24 11:36:40 +01:00
Niels Lyngsø b8928bac0b fix observation controller instance property 2025-01-24 11:35:52 +01:00
Niels LyngsøandGitHub 4a6740bfd4 Merge branch 'v15/dev' into v15/bugfix/17372 2025-01-24 11:32:19 +01:00
Niels Lyngsø c6f11ab4b2 implement validation for mandatory 2025-01-24 11:30:47 +01:00
jonat123andGitHub 1d9704d8b1 Fixed wrong localization for button on image crops (#18106) 2025-01-24 09:51:23 +00:00
1e5e9d4c24 Allowed retrieval of current user configuration when accessing user profile as a non-admin user (#18099)
* Allowed retrieval of current user configuration when accessing user profile as a non-admin user.

* Update src/Umbraco.Web.UI.Client/src/packages/user/user/repository/config/current-user-config.repository.ts

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-01-24 09:41:03 +00:00
Kenn JacobsenandGitHub 8485458896 Add clientside validation to webhook events (#18089) 2025-01-23 17:01:55 +01:00
Niels LyngsøandGitHub 7b00033c42 Fix: 17764 (#18093)
* Add property value model type

* make the element a Form Control
2025-01-23 14:21:00 +00:00
Mads Rasmussen 1db821ffcb show notification when offline 2025-01-23 14:37:54 +01:00
Niels Lyngsø ec508918d3 reject and clear messages 2025-01-23 14:36:26 +01:00
Nikolaj Geisle 3d253f5f06 bump version 2025-01-23 11:15:26 +01:00
Nikolaj Geisle 64287d7e1a Merge branch 'release/13.5.3' into release/13.6
# Conflicts:
#	version.json
2025-01-23 11:14:47 +01:00
Nikolaj Geisle 776e7313d0 Merge branch 'release/15.2' into v15/dev 2025-01-23 11:08:50 +01:00
Niels Lyngsø 27aef0b435 fix test 2025-01-23 10:58:33 +01:00
822a8cc2f1 v16: Start removing scope references (#18074)
* Start removing scope references

* Update src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Make test-only ctor internal

* Fix tests

* Dont treat warnings as errors

* Disable package validation, as this is a major

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-01-22 21:19:12 +01:00
Jacob Overgaard 32792b4ba4 feat: removes deprecated setting HideBackOfficeLogo 2025-01-22 14:21:54 +01:00
Jacob Overgaard 849b98cbaf bump version to 16.0.0-rc 2025-01-22 14:21:19 +01:00
Jacob Overgaard 0b3836456e Merge branch 'v15/dev' into v16/dev 2025-01-22 14:20:34 +01:00
Andy ButlandandGitHub edc78a5a4c Handles migration case where an expected constraint is renamed but the constraint does not exist. (#18063) 2025-01-22 12:26:06 +01:00
Nikolaj GeisleandGitHub c847a111fe 15: Convert pagesize properly to skip and take (#18069)
* convert pagesize properly to skip and take

* Obsolete pagesize & pageIndex GetAll method
2025-01-22 10:39:26 +01:00
98ff36b6a8 Validates and prevents save when providing a number outside of the configured range. (#17991)
* Validates and prevents save when providing a number outside of the configured range.

* Refactored to make use of `UmbFormControlMixin`

This flags the property layout container to be invalid (with prompt).
Adds localization keys.

* Corrected localization parameter order

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-01-22 09:18:39 +00:00
Jacob Overgaard f67a900cc1 bump version to 15.3.0-rc 2025-01-22 10:15:21 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ff44cf3a14 Bump vite from 5.4.11 to 5.4.14 in /src/Umbraco.Web.UI.Login (#18066)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.11 to 5.4.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.14/packages/vite)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 08:16:40 +00:00
dependabot[bot]andJacob Overgaard 3eca03a735 Bump @umbraco-cms/backoffice in /src/Umbraco.Web.UI.Login
Bumps [@umbraco-cms/backoffice](https://github.com/umbraco/Umbraco-CMS) from 15.0.0 to 15.1.2.
- [Release notes](https://github.com/umbraco/Umbraco-CMS/releases)
- [Commits](https://github.com/umbraco/Umbraco-CMS/compare/release-15.0.0...release-15.1.2)

---
updated-dependencies:
- dependency-name: "@umbraco-cms/backoffice"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 08:36:11 +01:00
Niels LyngsøandGitHub a9bf90053a enable areas to be undefined (#18057) 2025-01-21 19:38:41 +01:00
Niels LyngsøandGitHub 800873c2f1 Fix settings value begin indifference (#18022) 2025-01-21 16:43:11 +00:00
Sven Geusens 880f49abdb Merge branch 'v14/dev' into v15/dev 2025-01-21 16:54:05 +01:00
Andy Butland f79b0f8fa7 Fix schema defined in JSON schema tool definition after merge from 13. 2025-01-21 16:51:27 +01:00
Andy Butland 8056a59a10 Fix schema defined in JSON schema tool definition after merge from 13. 2025-01-21 15:52:31 +01:00
1a18d6c035 Replaced deprecated navigator.platform with navigator.userAgent for platform detection. (#17373)
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-01-21 13:56:40 +01:00
Andy Butland 3e877182b5 Merge branch 'v13/contrib' into v13/dev 2025-01-21 09:47:20 +01:00
Martin VennevoldandGitHub 0e4f883bc1 Fix create child issue in list view with infinite editor (#13355). (#17637) 2025-01-21 09:44:22 +01:00
Andy Butland 265cc62ab8 Merge branch 'release/13.6' into v13/dev 2025-01-21 09:21:36 +01:00
Andy Butland 800c16970e Merge branch 'release/13.6' of https://github.com/umbraco/Umbraco-CMS into release/13.6 2025-01-21 09:20:11 +01:00
Andy Butland 6bd11bf233 Fixes failing front-end unit test to align with new behaviour from PR #17818 (
Allow skipSelect blueprints only when one blueprint exists).
2025-01-21 09:19:31 +01:00
Kenn Jacobsen a2fd82a3f3 Add NoopCurrentMemberClaimsProvider so Umbraco can boot without the Delivery API enabled (#18049) 2025-01-21 09:13:31 +01:00
Kenn JacobsenandGitHub 7567990da1 Add NoopCurrentMemberClaimsProvider so Umbraco can boot without the Delivery API enabled (#18049) 2025-01-21 09:10:43 +01:00
Zeegaan c7d157bbfd build on ubuntu 2025-01-21 09:02:00 +01:00
Nikolaj Geisle 2161edb871 Bump version 2025-01-21 07:41:06 +01:00
Matthew CareandGitHub 5c0cdf5e58 Fix health check link (#17828)
"Back to overview" would push the wrong url to the history, which would break things if you reloaded your page
2025-01-21 07:30:07 +01:00
Nikolaj Geisle e77e9c5691 Format sql statement (#17354)
(cherry picked from commit aa9f194d76)
2025-01-20 18:27:54 +01:00
Nikolaj Geisle e934a943b5 build on windows 2025-01-20 17:37:04 +01:00
Andy ButlandandGitHub 95eb58587b Merge commit from fork 2025-01-20 14:14:28 +01:00
25628a8b76 Lucene Package Update to Address CVE-2024-43383 (#17942)
* Update Lucene Package to 4.8.0-beta00017

* Add Package Reference

---------

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2025-01-20 11:45:35 +01:00
Callum WhyteandAndy Butland 7552e315fb Allow skipSelect blueprints only when one blueprint exists (#17818) 2025-01-20 11:45:26 +01:00
Callum WhyteandGitHub d15b5b221e Allow skipSelect blueprints only when one blueprint exists (#17818) 2025-01-20 10:27:54 +01:00
Mads Rasmussen a271822f02 wip decouple of workspace 2025-01-17 13:25:09 +01:00
Mads Rasmussen 724cda740f remove condition in manifest 2025-01-17 12:28:20 +01:00
Mads Rasmussen c12f6a2273 Update media-links-workspace-info-app.element.ts 2025-01-17 09:53:05 +01:00
Mads Rasmussen e3dd44f357 split media links into info app 2025-01-17 09:51:55 +01:00
Mads Rasmussen 4a728d88c2 remove double box 2025-01-17 09:29:55 +01:00
Mads Rasmussen a9039389f4 register references 2025-01-17 09:28:05 +01:00
Mads Rasmussen 61c3f529e5 move url files into folder 2025-01-17 08:43:42 +01:00
Mads Rasmussen dc7f02f121 register media history 2025-01-16 22:25:39 +01:00
Mads Rasmussen 810b7d6de3 remove double box containers + adjust styling 2025-01-16 21:05:03 +01:00
Mads Rasmussen df8da92344 wrap apps in a box element 2025-01-16 20:53:32 +01:00
Mads Rasmussen faf13c3f9e localize labels 2025-01-16 18:54:54 +01:00
Mads Rasmussen 6a6353d01b add types for the extension point 2025-01-16 18:50:01 +01:00
Mads Rasmussen f5c0e15716 Merge branch 'v15/dev' into v15/feature/workspace-info-app-extension 2025-01-16 18:30:43 +01:00
Mads Rasmussen daf2e18cd2 get unique from context 2025-01-16 15:55:43 +01:00
Mads Rasmussen 49aae77b8e align naming 2025-01-16 15:18:16 +01:00
Mads Rasmussen 4026e03606 register references as an extension 2025-01-16 15:15:56 +01:00
Mads Rasmussen 04f7da81ec register links and history as info apps 2025-01-16 15:07:54 +01:00
0d1cdd1bb4 Refactor setting arrays to sets (#16058)
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-12-02 15:50:23 +01:00
leekelleher 1504b5c0d3 Implements "inheritance" composition 2024-11-27 14:19:09 +00:00
kjac d482d9161c Accept parent key equal to inheritance composition key when creating document and media types 2024-11-27 12:39:36 +01:00
leekelleher 57d6bd75e3 [WIP] Temp fix for circular reference 2024-11-27 11:22:19 +00:00
leekelleher e5168dee4a Merge branch 'v15/dev' into v15/bugfix/nested-document-types 2024-11-27 11:20:05 +00:00
leekelleher 254e81823f Nested document types (client) 2024-11-26 10:35:22 +00:00
4051 changed files with 96291 additions and 67000 deletions
+72 -35
View File
@@ -1,5 +1,7 @@
# Umbraco CMS Build
This guide will explain how you can build the Umbraco CMS from the source code. You will most likely want to do this if your are setting up a local development environment for contributing code updates to the project. You will need this in order to develop and test your fix or feature.
## Are you sure?
In order to use Umbraco as a CMS and build your website with it, you should not build it yourself. If you're reading this then you're trying to contribute to Umbraco or you're debugging a complex issue.
@@ -13,7 +15,7 @@ If the answer is yes, please read on. Otherwise, make sure to head on over [to t
↖️ You can jump to any section by using the "table of contents" button ( ![Table of contents icon](img/tableofcontentsicon.svg) ) above.
## Debugging source locally
## Working with the Umbraco source code
Did you read ["Are you sure"](#are-you-sure)?
@@ -21,73 +23,109 @@ Did you read ["Are you sure"](#are-you-sure)?
If you want to run a build without debugging, see [Building from source](#building-from-source) below. This runs the build in the same way it is run on our build servers.
> [!NOTE]
> The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
If you've got this far and are keen to get stuck in helping us fix a bug or implement a feature, great! Please read on...
#### Debugging with VS Code
### Prerequisites
In order to build the Umbraco source code locally with Visual Studio Code, first make sure you have the following installed.
In order to work with the Umbraco source code locally, first make sure you have the following installed.
- [Visual Studio Code](https://code.visualstudio.com/)
- Your favourite IDE: [Visual Studio 2022 v17+ with .NET 7+](https://visualstudio.microsoft.com/vs/), [Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/)
- [dotnet SDK v9+](https://dotnet.microsoft.com/en-us/download)
- [Node.js v20+](https://nodejs.org/en/download/)
- npm v10+ (installed with Node.js)
- [Git command line](https://git-scm.com/download/)
Open the root folder of the repository in Visual Studio Code.
### Familiarizing yourself with the code
To build the front-end you'll need to open the command pallet (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and run `>Tasks: Run Task` followed by `Client Build`.
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
You can also run the tasks manually on the command line:
There are two web projects in the solution with client-side assets based on TypeScript, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`.
There are a few different ways to work locally when implementing features or fixing issues with the Umbraco CMS. Depending on whether you are working solely on the front-end, solely on the back-end, or somewhere in between, you may find different workflows work best for you.
Here are some suggestions based on how we work on developing Umbraco at HQ.
### First checkout
When you first clone the source code, build the whole solution via your IDE. You can then start the `Umbraco.Web.UI` project via the IDE or the command line and should find everything across front and back-end is built and running.
```
cd src\Umbraco.Web.UI.Client
npm i
npm run build:for:cms
cd <solution root>\src\Umbraco.Web.UI
dotnet run --no-build
```
If you want to make changes to the UI, you can choose to run a front-end development server. To learn more please read the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
When the page loads in your web browser, you can follow the installer to set up a database for debugging. When complete, you will have an empty Umbraco installation to begin working with. You may also wish to install a [starter kit][https://marketplace.umbraco.com/category/themes-&-starter-kits] to ease your debugging.
The login screen is a different frontend build, for that one you can run it as follows:
### Back-end only changes
If you are working on back-end only features, when switching branches or pulling down the latest from GitHub, you will find the front-end getting rebuilt periodically when you look to build the back-end changes. This can take a while and slow you down. So if for a period of time you don't care about changes in the front-end, you can disable this build step.
Go to `Umbraco.Cms.StaticAssets.csproj` and comment out the following lines of MsBuild by adding a REM statement in front:
```
cd src\Umbraco.Web.UI.Login
npm i
npm run dev
REM npm ci --no-fund --no-audit --prefer-offline
REM npm run build:for:cms
```
If you just want to build the Login screen to `Umbraco.Web.UI` then instead of running `dev`, you can do: `npm run build`.
Just be careful not to include this change in your PR.
To run the C# portion of the project, either hit <kbd>F5</kbd> to begin debugging, or manually using the command line:
### Front-end only changes
Conversely, if you are working on front-end only, you want to build the back-end once and then run it. Before you do so, update the configuration in `appSettings.json` to add the following under `Umbraco:Cms:Security`:
```
dotnet watch --project .\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj
"BackOfficeHost": "http://localhost:5173",
"AuthorizeCallbackPathName": "/oauth_complete",
"AuthorizeCallbackLogoutPathName": "/logout",
"AuthorizeCallbackErrorPathName": "/error"
```
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
Then run Umbraco from the command line.
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
```
cd <solution root>\src\Umbraco.Web.UI
dotnet run --no-build
```
#### Debugging with Visual Studio
In another terminal window, run the following to watch the front-end changes and launch Umbraco using the URL indicated from this task.
In order to build the Umbraco source code locally with Visual Studio, first make sure you have the following installed.
```
cd <solution root>\src\Umbraco.Web.UI.Client
npm run dev:server
```
- [Visual Studio 2022 v17+ with .NET 7+](https://visualstudio.microsoft.com/vs/) ([the community edition is free](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) for you to use to contribute to Open Source projects)
- [Node.js v20+](https://nodejs.org/en/download/)
- npm v10+ (installed with Node.js)
- [Git command line](https://git-scm.com/download/)
You'll find as you make changes to the front-end files, the updates will be picked up and your browser refreshed automatically.
The easiest way to get started is to open `umbraco.sln` in Visual Studio.
> [!NOTE]
> The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to [disable caching in the browser (check "Disable cache" on the "Network" tab of developer tools)][disable browser caching] to help you to see the changes you're making.
Umbraco is a C# based codebase, which is mostly ASP.NET Core MVC based. You can make changes, build them in Visual Studio, and hit <kbd>F5</kbd> to see the result. There are two web projects in the solution, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`. They each have their own build process and can be run separately. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes. It will automatically restore and build the client projects when you run it.
Whilst most of the backoffice code lives in `Umbraco.Web.UI.Client`, the login screen is in a separate project. If you do any work with that you can build with:
If you want to watch the UI Client to `Umbraco.Web.UI` then you can open a terminal in `src/Umbraco.Web.UI.Client` where you can run `npm run dev:mock` manually. This will launch the Vite dev server on http://localhost:5173 and watch for changes with mocked API responses.
```
cd <solution root>\src\Umbraco.Web.UI.Login
npm run build
```
You can also run `npm run dev:server` to run the Vite server against a local Umbraco instance. In this case, you need to have the .NET project running and accept connections from the Vite server. Please see the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
In both front-end projects, if you've refreshed your branch from the latest on GitHub you may need to update front-end dependencies.
**The initial C# build might take a _really_ long time (seriously, go and make a cup of coffee!) - but don't worry, this will be faster on subsequent runs.**
To do that, run:
When the page eventually loads in your web browser, you can follow the installer to set up a database for debugging. You may also wish to install a [starter kit][starter kits] to ease your debugging.
```
npm ci --no-fund --no-audit --prefer-offline
```
### Full-stack changes
If working across both front and back-end, follow both methods and use `dotnet watch`, or re-run `dotnet run` (or `dotnet build` followed by `dotnet run --no-build`) whenever you need to update the back-end code.
Request and response models used by the management APIs are made available client-side as generated code. If you make changes to the management API, you can re-generate the typed client code with:
```
cd <solution root>\src\Umbraco.Web.UI.Client
npm run generate:server-api-dev
```
Please also update the `OpenApi.json` file held in the solution by copying and pasting the output from `/umbraco/swagger/management/swagger.json`.
## Building from source
@@ -148,5 +186,4 @@ The produced artifacts are published in a container that can be downloaded from
Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details).
[ contribution guidelines]: CONTRIBUTING.md "Read the guide to contributing for more details on contributing to Umbraco"
[ starter kits ]: https://our.umbraco.com/packages/?category=Starter%20Kits&version=9 "Browse starter kits available for v9 on Our "
[ disable browser caching ]: https://techwiser.com/disable-cache-google-chrome-firefox "Instructions on how to disable browser caching in Chrome and Firefox"
+21 -12
View File
@@ -4,34 +4,43 @@
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
## Getting Started
We have a guide on [what to consider before you start](contributing-before-you-start.md) and more detailed guides at the end of this article.
The following steps are a quick-start guide:
## Contribution guide
This guide describes each step to make your first contribution:
1. **Fork**
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
![Fork the repository](img/forkrepository.png)
2. **Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
![Clone the fork](img/clonefork.png)
![Clone the fork](img/clonefork.png)
3. **Switch to the correct branch**
Switch to the `contrib` branch
4. **Build**
4. **Branch out**
Build your fork of Umbraco locally [as described in the build documentation](BUILD.md), you can build with any IDE that supports dotnet or the command line.
Create a new branch based on `contrib` and name it after the issue you're fixing, For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
5. **Branch**
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp/12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
This is a development branch for the particular issue you're working on, in this case a bug-fix for issue number `18132` that affects Umbraco v.15.
Don't commit to `contrib`, create a new branch first.
5. **Build or run a Development Server**
You can build or run a Development Server with any IDE that supports DotNet or the command line.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
6. **Change**
@@ -41,7 +50,7 @@ The following steps are a quick-start guide:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your branch. When it's ready push the changes to your fork on GitHub.
8. **Create pull request**
+2 -2
View File
@@ -6,8 +6,8 @@ body:
- type: input
id: "version"
attributes:
label: "Which Umbraco version are you using? (Please write the *exact* version, example: 10.1.0)"
description: "Use the help icon in the Umbraco backoffice to find the version you're using"
label: "Which Umbraco version are you using?"
description: "Please write the *exact* version, example: `10.1.0`. Use the help icon in the Umbraco backoffice to find the version you're using"
validations:
required: true
- type: textarea
+5 -4
View File
@@ -1,11 +1,12 @@
# [Umbraco CMS](https://umbraco.com)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
![Mastodon Follow](https://img.shields.io/mastodon/follow/110661369750014952?domain=https%3A%2F%2Fumbracocommunity.social)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
[![Read what's going on in the Umbraco Discord chat now](https://img.shields.io/badge/read-discord-blue)](https://discord-chats.umbraco.com)
[![NuGet Version](https://img.shields.io/nuget/v/Umbraco.Cms)](https://www.nuget.org/packages/Umbraco.Cms)
[![Build status](https://img.shields.io/azure-devops/build/umbraco/Umbraco%2520Cms/301?logo=azurepipelines&label=Azure%20Pipelines)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=301)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![Chat about Umbraco on Discord](https://img.shields.io/discord/869656431308189746?logo=discord&logoColor=fff)](https://discord.gg/umbraco)
[![Read what's going on in the Umbraco Discord chat now](https://img.shields.io/badge/read-discord-blue)](https://discord-chats.umbraco.com)
![Mastodon Follow](https://img.shields.io/mastodon/follow/110661369750014952?domain=https%3A%2F%2Fumbracocommunity.social)
### Umbraco is a free and open source .NET content management system. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
+55
View File
@@ -0,0 +1,55 @@
name: Backoffice Static Web Apps CI/CD
on:
push:
branches:
- contrib
- v*/dev
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-backoffice.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- contrib
- v*/dev
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && (contains(github.event.pull_request.labels.*.name, 'preview/backoffice')))
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: contrib
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run build:for:static"
output_location: "dist" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
action: "close"
+56
View File
@@ -0,0 +1,56 @@
name: Storybook CI/CD
on:
push:
branches:
- contrib
- v*/dev
paths:
- src/Umbraco.Web.UI.Client/package.json
- src/Umbraco.Web.UI.Client/package-lock.json
- src/Umbraco.Web.UI.Client/src/**
- .github/workflows/azure-storybook.yml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- contrib
- v*/dev
env:
NODE_OPTIONS: --max_old_space_size=16384
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && (contains(github.event.pull_request.labels.*.name, 'preview/storybook')))
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
production_branch: contrib
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/Umbraco.Web.UI.Client" # App source code path
app_build_command: "npm run storybook:build"
output_location: "/storybook-static" # Built app content directory - optional
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "src/Umbraco.Web.UI.Client"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_SEA_0C7411A03 }}
action: "close"
+2
View File
@@ -43,6 +43,8 @@ jobs:
- name: Check for circular dependencies
run: node devops/circular/index.js src
- run: npm run lint:errors
- run: npm run generate:tsconfig
- run: npm run generate:icons
- run: npm run build:for:cms
- run: npm run check:paths
- run: npm run generate:jsonschema:dist
+1
View File
@@ -0,0 +1 @@
../src/Umbraco.Web.UI.Client/.vscode/lit.code-snippets
+8
View File
@@ -0,0 +1,8 @@
{
"cSpell.words": ["unprovide"],
"eslint.useFlatConfig": true,
"eslint.workingDirectories": [
"./src/Umbraco.Web.UI.Client/",
"./src/Umbraco.Web.UI.Login/"
]
}
+2 -1
View File
@@ -20,6 +20,7 @@
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<!--
TODO: Fix and remove overrides:
@@ -39,7 +40,7 @@
<!-- Package Validation -->
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>true</EnablePackageValidation>
<EnablePackageValidation>false</EnablePackageValidation>
<PackageValidationBaselineVersion>15.0.0</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
+30 -30
View File
@@ -14,25 +14,25 @@
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.2" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="9.0.0-preview.9.24556.5" />
</ItemGroup>
<!-- Umbraco packages -->
@@ -45,23 +45,23 @@
<PackageVersion Include="Asp.Versioning.Mvc" Version="8.1.0" />
<PackageVersion Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
<PackageVersion Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
<PackageVersion Include="Examine" Version="3.6.0" />
<PackageVersion Include="Examine.Core" Version="3.5.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.71" />
<PackageVersion Include="Examine" Version="3.7.0" />
<PackageVersion Include="Examine.Core" Version="3.7.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.74" />
<PackageVersion Include="JsonPatch.Net" Version="3.1.1" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="MailKit" Version="4.8.0" />
<PackageVersion Include="MailKit" Version="4.10.0" />
<PackageVersion Include="Markdown" Version="2.2.1" />
<PackageVersion Include="MessagePack" Version="2.5.192" />
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.3.8" />
<PackageVersion Include="MiniProfiler.Shared" Version="4.5.4" />
<PackageVersion Include="ncrontab" Version="3.3.3" />
<PackageVersion Include="NPoco" Version="5.7.1" />
<PackageVersion Include="NPoco.SqlServer" Version="5.7.1" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.0.0-preview3.24551.41" />
<PackageVersion Include="Serilog" Version="4.1.0" />
<PackageVersion Include="OpenIddict.Abstractions" Version="6.1.1" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="6.1.1" />
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="6.1.1" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="3.0.0" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" />
@@ -73,14 +73,14 @@
<PackageVersion Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.Map" Version="2.0.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.6" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.3" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="7.1.0" />
</ItemGroup>
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
<ItemGroup>
<!-- Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer brings in a vulnerable version of Azure.Identity -->
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<!-- Take top-level depedendency on Azure.Identity, because Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
<!-- Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of System.Runtime.Caching -->
<PackageVersion Include="System.Runtime.Caching" Version="9.0.0" />
@@ -91,7 +91,7 @@
<!-- Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc brings in a vulnerable version of System.Text.RegularExpressions -->
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
<!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.2.1" />
<!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.0" />
+10
View File
@@ -0,0 +1,10 @@
{
"folders": [
{
"path": "src/Umbraco.Web.UI.Client"
},
{
"path": "src/Umbraco.Web.UI.Login"
}
]
}
+54 -27
View File
@@ -9,6 +9,11 @@ parameters:
displayName: Run SQL Server Linux Acceptance Tests
type: boolean
default: false
# Skipped due to DB locks, the tests are still being run on the Nightly build
- name: sqliteAcceptanceTests
displayName: Run SQLite Acceptance Tests
type: boolean
default: false
- name: myGetDeploy
displayName: Deploy to MyGet
type: boolean
@@ -484,6 +489,8 @@ stages:
# E2E Tests
- job:
displayName: E2E Tests (SQLite)
# currently disabled due to DB locks randomly occuring.
condition: eq(${{parameters.sqliteAcceptanceTests}}, True)
variables:
# Connection string
CONNECTIONSTRINGS__UMBRACODBDSN: Data Source=Umbraco;Mode=Memory;Cache=Shared;Foreign Keys=True;Pooling=True
@@ -492,22 +499,22 @@ stages:
matrix:
LinuxPart1Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
LinuxPart2Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
LinuxPart3Of3:
vmImage: "ubuntu-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=1/3"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=2/3"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTest -- --shard=3/3"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -586,14 +593,13 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
@@ -603,11 +609,11 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Copy artifacts
- pwsh: |
@@ -617,13 +623,24 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
# Publish test artifacts
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
- job:
displayName: E2E Tests (SQL Server)
variables:
@@ -634,29 +651,29 @@ stages:
matrix:
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
LinuxPart1Of3:
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart2Of3:
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
LinuxPart3Of3:
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
vmImage: "ubuntu-latest"
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
WindowsPart1Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
testCommand: "npm run smokeTest -- --shard=1/3"
WindowsPart2Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
testCommand: "npm run smokeTest -- --shard=2/3"
WindowsPart3Of3:
vmImage: "windows-latest"
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
testCommand: "npm run smokeTest -- --shard=3/3"
pool:
vmImage: $(vmImage)
steps:
@@ -743,14 +760,13 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Install Playwright and dependencies
- pwsh: npx playwright install --with-deps
displayName: Install Playwright
- pwsh: npx playwright install chromium
displayName: Install Playwright only with Chromium browser
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
# Test
- pwsh: $(testCommand)
displayName: Run Playwright tests
continueOnError: true
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
@@ -760,20 +776,20 @@ stages:
# Stop application
- bash: kill -15 $(AcceptanceTestProcessId)
displayName: Stop application (Linux)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Linux'))
- pwsh: Stop-Process -Id $(AcceptanceTestProcessId)
displayName: Stop application (Windows)
condition: and(succeeded(), ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
condition: and(ne(variables.AcceptanceTestProcessId, ''), eq(variables['Agent.OS'], 'Windows_NT'))
# Stop SQL Server
- pwsh: docker stop mssql
displayName: Stop SQL Server Docker image (Linux)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
condition: eq(variables['Agent.OS'], 'Linux')
- pwsh: SqlLocalDB stop MSSQLLocalDB
displayName: Stop SQL Server LocalDB (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
condition: eq(variables['Agent.OS'], 'Windows_NT')
# Copy artifacts
- pwsh: |
@@ -783,13 +799,24 @@ stages:
displayName: Copy Playwright results
condition: succeededOrFailed()
# Publish
# Publish test artifacts
- task: PublishPipelineArtifact@1
displayName: Publish test artifacts
condition: succeededOrFailed()
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
###############################################
## Release
###############################################
@@ -798,7 +825,7 @@ stages:
dependsOn:
- Unit
- Integration
# - E2E
- E2E
condition: and(succeeded(), or(eq(dependencies.Build.outputs['A.build.NBGV_PublicRelease'], 'True'), ${{parameters.myGetDeploy}}))
jobs:
- job:
+21
View File
@@ -10,6 +10,7 @@ schedules:
include:
- v14/dev
- v15/dev
- v16/dev
variables:
nodeVersion: 20
@@ -248,6 +249,16 @@ stages:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
- job:
displayName: E2E Tests (SQL Server)
timeoutInMinutes: 180
@@ -418,3 +429,13 @@ stages:
inputs:
targetPath: $(Build.ArtifactStagingDirectory)
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
# Publish test results
- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: "tests/Umbraco.Tests.AcceptanceTest/results"
testRunTitle: "$(Agent.JobName)"
+2 -1
View File
@@ -9,9 +9,10 @@ schedules:
branches:
include:
- v10/dev
- v12/dev
- v13/dev
- v14/dev
- v15/dev
- v16/dev
steps:
- checkout: none
@@ -7,7 +7,6 @@ using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Common.Configuration;
@@ -18,13 +17,6 @@ public class ConfigureUmbracoSwaggerGenOptions : IConfigureOptions<SwaggerGenOpt
private readonly ISchemaIdSelector _schemaIdSelector;
private readonly ISubTypesSelector _subTypesSelector;
[Obsolete("Use non-obsolete constructor. This will be removed in Umbraco 16.")]
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector)
: this(operationIdSelector, schemaIdSelector, StaticServiceProvider.Instance.GetRequiredService<ISubTypesSelector>())
{ }
public ConfigureUmbracoSwaggerGenOptions(
IOperationIdSelector operationIdSelector,
ISchemaIdSelector schemaIdSelector,
@@ -5,8 +5,5 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public interface IOperationIdSelector
{
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions);
string? OperationId(ApiDescription apiDescription);
}
@@ -16,9 +16,6 @@ public class OperationIdSelector : IOperationIdSelector
public OperationIdSelector(IEnumerable<IOperationIdHandler> operationIdHandlers)
=> _operationIdHandlers = operationIdHandlers;
[Obsolete("Use overload that only takes ApiDescription instead. This will be removed in Umbraco 15.")]
public virtual string? OperationId(ApiDescription apiDescription, ApiVersioningOptions apiVersioningOptions) => OperationId(apiDescription);
public virtual string? OperationId(ApiDescription apiDescription)
{
IOperationIdHandler? handler = _operationIdHandlers.FirstOrDefault(h => h.CanHandle(apiDescription));
@@ -10,12 +10,12 @@ namespace Umbraco.Cms.Api.Common.OpenApi;
public class SubTypesSelector : ISubTypesSelector
{
private readonly IOptions<GlobalSettings> _settings;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IEnumerable<ISubTypesHandler> _subTypeHandlers;
private readonly IUmbracoJsonTypeInfoResolver _umbracoJsonTypeInfoResolver;
[Obsolete("The settings parameter is not required anymore, use the other constructor instead. Scheduled for removal in Umbraco 17.")]
public SubTypesSelector(
IOptions<GlobalSettings> settings,
IHostingEnvironment hostingEnvironment,
@@ -23,7 +23,18 @@ public class SubTypesSelector : ISubTypesSelector
IEnumerable<ISubTypesHandler> subTypeHandlers,
IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver)
{
_settings = settings;
_hostingEnvironment = hostingEnvironment;
_httpContextAccessor = httpContextAccessor;
_subTypeHandlers = subTypeHandlers;
_umbracoJsonTypeInfoResolver = umbracoJsonTypeInfoResolver;
}
public SubTypesSelector(
IHostingEnvironment hostingEnvironment,
IHttpContextAccessor httpContextAccessor,
IEnumerable<ISubTypesHandler> subTypeHandlers,
IUmbracoJsonTypeInfoResolver umbracoJsonTypeInfoResolver)
{
_hostingEnvironment = hostingEnvironment;
_httpContextAccessor = httpContextAccessor;
_subTypeHandlers = subTypeHandlers;
@@ -32,7 +43,7 @@ public class SubTypesSelector : ISubTypesSelector
public IEnumerable<Type> SubTypes(Type type)
{
var backOfficePath = _settings.Value.GetBackOfficePath(_hostingEnvironment);
var backOfficePath = _hostingEnvironment.GetBackOfficePath();
var swaggerPath = $"{backOfficePath}/swagger";
if (_httpContextAccessor.HttpContext?.Request.Path.StartsWithSegments(swaggerPath) ?? false)
@@ -7,7 +7,7 @@ using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using Swashbuckle.AspNetCore.SwaggerUI;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment;
@@ -30,24 +30,21 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
IOptions<SwaggerGenOptions> swaggerGenOptions = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<SwaggerGenOptions>>();
applicationBuilder.UseSwagger(swaggerOptions =>
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
{
swaggerOptions.RouteTemplate = SwaggerRouteTemplate(applicationBuilder);
});
applicationBuilder.UseSwaggerUI(swaggerUiOptions => SwaggerUiConfiguration(swaggerUiOptions, swaggerGenOptions.Value, applicationBuilder));
}
protected virtual bool SwaggerIsEnabled(IApplicationBuilder applicationBuilder)
{
IWebHostEnvironment webHostEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>();
return webHostEnvironment.IsProduction() is false;
}
=> applicationBuilder.ApplicationServices.GetRequiredService<IWebHostEnvironment>().IsProduction() is false;
protected virtual string SwaggerRouteTemplate(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger/{{documentName}}/swagger.json";
protected virtual string SwaggerUiRoutePrefix(IApplicationBuilder applicationBuilder)
=> $"{GetUmbracoPath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
=> $"{GetBackOfficePath(applicationBuilder).TrimStart(Constants.CharArrays.ForwardSlash)}/swagger";
protected virtual void SwaggerUiConfiguration(
SwaggerUIOptions swaggerUiOptions,
@@ -56,8 +53,7 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
{
swaggerUiOptions.RoutePrefix = SwaggerUiRoutePrefix(applicationBuilder);
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs
.OrderBy(x => x.Value.Title))
foreach ((var name, OpenApiInfo? apiInfo) in swaggerGenOptions.SwaggerGeneratorOptions.SwaggerDocs.OrderBy(x => x.Value.Title))
{
swaggerUiOptions.SwaggerEndpoint($"{name}/swagger.json", $"{apiInfo.Title}");
}
@@ -70,11 +66,6 @@ public class SwaggerRouteTemplatePipelineFilter : UmbracoPipelineFilter
swaggerUiOptions.OAuthUsePkce();
}
private string GetUmbracoPath(IApplicationBuilder applicationBuilder)
{
GlobalSettings settings = applicationBuilder.ApplicationServices.GetRequiredService<IOptions<GlobalSettings>>().Value;
IHostingEnvironment hostingEnvironment = applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>();
return settings.GetBackOfficePath(hostingEnvironment);
}
private string GetBackOfficePath(IApplicationBuilder applicationBuilder)
=> applicationBuilder.ApplicationServices.GetRequiredService<IHostingEnvironment>().GetBackOfficePath();
}
@@ -48,7 +48,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions :
Id = AuthSchemeName,
}
},
new string[] { }
[]
}
}
};
@@ -1,4 +1,3 @@
using System.Diagnostics;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -8,7 +7,6 @@ using Umbraco.Cms.Core.Models.PublishedContent;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdContentApiController : ContentApiItemControllerBase
{
@@ -21,16 +19,6 @@ public class ByIdContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a content item by id.
/// </summary>
@@ -8,7 +8,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsContentApiController : ContentApiItemControllerBase
{
@@ -21,15 +20,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
: base(apiPublishedContentCache, apiContentResponseBuilder)
=> _requestMemberAccessService = requestMemberAccessService;
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets content items by ids.
/// </summary>
@@ -58,6 +48,6 @@ public class ByIdsContentApiController : ContentApiItemControllerBase
.WhereNotNull()
.ToArray();
return await Task.FromResult(Ok(apiContentItems));
return Ok(apiContentItems);
}
}
@@ -1,17 +1,13 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DeliveryApi;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.DeliveryApi;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByRouteContentApiController : ContentApiItemControllerBase
{
@@ -21,45 +17,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
private readonly IRequestMemberAccessService _requestMemberAccessService;
private const string PreviewContentRequestPathPrefix = $"/{Constants.DeliveryApi.Routing.PreviewContentPathPrefix}";
[Obsolete($"Please use the constructor that accepts {nameof(IApiContentPathResolver)}. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
StaticServiceProvider.Instance.GetRequiredService<IApiContentPathResolver>())
{
}
[Obsolete($"Please use the non-obsolete constructor. Will be removed in V15.")]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
IPublicAccessService publicAccessService,
IRequestRoutingService requestRoutingService,
IRequestRedirectService requestRedirectService,
IRequestPreviewService requestPreviewService,
IRequestMemberAccessService requestMemberAccessService,
IApiContentPathResolver apiContentPathResolver)
: this(
apiPublishedContentCache,
apiContentResponseBuilder,
requestRedirectService,
requestPreviewService,
requestMemberAccessService,
apiContentPathResolver)
{
}
[ActivatorUtilitiesConstructor]
public ByRouteContentApiController(
IApiPublishedContentCache apiPublishedContentCache,
IApiContentResponseBuilder apiContentResponseBuilder,
@@ -75,16 +32,6 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
_apiContentPathResolver = apiContentPathResolver;
}
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiContentResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByRoute(string path = "")
=> await HandleRequest(path);
/// <summary>
/// Gets a content item by route.
/// </summary>
@@ -117,7 +64,7 @@ public class ByRouteContentApiController : ContentApiItemControllerBase
return deniedAccessResult;
}
return await Task.FromResult(Ok(ApiContentResponseBuilder.Build(contentItem)));
return Ok(ApiContentResponseBuilder.Build(contentItem));
}
IApiContentRoute? redirectRoute = _requestRedirectService.GetRedirectRoute(path);
@@ -12,7 +12,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Content;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryContentApiController : ContentApiControllerBase
{
@@ -30,20 +29,6 @@ public class QueryContentApiController : ContentApiControllerBase
_requestMemberAccessService = requestMemberAccessService;
}
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiContentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of content item(s) from query.
/// </summary>
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models.DeliveryApi;
@@ -8,7 +8,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdMediaApiController : MediaApiControllerBase
{
@@ -19,14 +18,6 @@ public class ByIdMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item/{id:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ById(Guid id)
=> await HandleRequest(id);
/// <summary>
/// Gets a media item by id.
/// </summary>
@@ -36,16 +27,16 @@ public class ByIdMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByIdV20(Guid id)
=> await HandleRequest(id);
public Task<IActionResult> ByIdV20(Guid id)
=> Task.FromResult(HandleRequest(id));
private async Task<IActionResult> HandleRequest(Guid id)
private IActionResult HandleRequest(Guid id)
{
IPublishedContent? media = PublishedMediaCache.GetById(id);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -9,7 +9,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByIdsMediaApiController : MediaApiControllerBase
{
@@ -18,13 +17,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
{
}
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Item([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
/// <summary>
/// Gets media items by ids.
/// </summary>
@@ -33,10 +25,10 @@ public class ByIdsMediaApiController : MediaApiControllerBase
[HttpGet("items")]
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IEnumerable<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
public async Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> await HandleRequest(ids);
public Task<IActionResult> ItemsV20([FromQuery(Name = "id")] HashSet<Guid> ids)
=> Task.FromResult(HandleRequest(ids));
private async Task<IActionResult> HandleRequest(HashSet<Guid> ids)
private IActionResult HandleRequest(HashSet<Guid> ids)
{
IPublishedContent[] mediaItems = ids
.Select(PublishedMediaCache.GetById)
@@ -47,6 +39,6 @@ public class ByIdsMediaApiController : MediaApiControllerBase
.Select(BuildApiMediaWithCrops)
.ToArray();
return await Task.FromResult(Ok(apiMediaItems));
return Ok(apiMediaItems);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.DeliveryApi;
@@ -9,7 +9,6 @@ using Umbraco.Cms.Infrastructure.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class ByPathMediaApiController : MediaApiControllerBase
{
@@ -22,14 +21,6 @@ public class ByPathMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet("item/{*path}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> ByPath(string path)
=> await HandleRequest(path);
/// <summary>
/// Gets a media item by its path.
/// </summary>
@@ -39,17 +30,17 @@ public class ByPathMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(IApiMediaWithCropsResponse), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ByPathV20(string path)
=> await HandleRequest(path);
public Task<IActionResult> ByPathV20(string path)
=> Task.FromResult(HandleRequest(path));
private async Task<IActionResult> HandleRequest(string path)
private IActionResult HandleRequest(string path)
{
path = DecodePath(path);
IPublishedContent? media = _apiMediaQueryService.GetByPath(path);
if (media is null)
{
return await Task.FromResult(NotFound());
return NotFound();
}
return Ok(BuildApiMediaWithCrops(media));
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -14,7 +14,6 @@ using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Delivery.Controllers.Media;
[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class QueryMediaApiController : MediaApiControllerBase
{
@@ -27,19 +26,6 @@ public class QueryMediaApiController : MediaApiControllerBase
: base(publishedMediaCache, apiMediaWithCropsResponseBuilder)
=> _apiMediaQueryService = apiMediaQueryService;
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[Obsolete("Please use version 2 of this API. Will be removed in V15.")]
public async Task<IActionResult> Query(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
/// <summary>
/// Gets a paginated list of media item(s) from query.
/// </summary>
@@ -53,15 +39,15 @@ public class QueryMediaApiController : MediaApiControllerBase
[MapToApiVersion("2.0")]
[ProducesResponseType(typeof(PagedViewModel<IApiMediaWithCropsResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> QueryV20(
public Task<IActionResult> QueryV20(
string? fetch,
[FromQuery] string[] filter,
[FromQuery] string[] sort,
int skip = 0,
int take = 10)
=> await HandleRequest(fetch, filter, sort, skip, take);
=> Task.FromResult(HandleRequest(fetch, filter, sort, skip, take));
private async Task<IActionResult> HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
private IActionResult HandleRequest(string? fetch, string[] filter, string[] sort, int skip, int take)
{
Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> queryAttempt = _apiMediaQueryService.ExecuteQuery(fetch, filter, sort, skip, take);
@@ -79,6 +65,6 @@ public class QueryMediaApiController : MediaApiControllerBase
Items = mediaItems.Select(BuildApiMediaWithCrops)
};
return await Task.FromResult(Ok(model));
return Ok(model);
}
}
@@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
@@ -13,7 +12,6 @@ using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Api.Delivery.Routing;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Extensions;
@@ -33,31 +31,6 @@ public class MemberController : DeliveryApiControllerBase
private readonly DeliveryApiSettings _deliveryApiSettings;
private readonly ILogger<MemberController> _logger;
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, StaticServiceProvider.Instance.GetRequiredService<IMemberClientCredentialsManager>(), deliveryApiSettings, logger)
{
}
[Obsolete("Please use the non-obsolete constructor. Will be removed in V16.")]
public MemberController(
IHttpContextAccessor httpContextAccessor,
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
IMemberClientCredentialsManager memberClientCredentialsManager,
IOptions<DeliveryApiSettings> deliveryApiSettings,
ILogger<MemberController> logger)
: this(memberSignInManager, memberManager, memberClientCredentialsManager, deliveryApiSettings, logger)
{
}
[ActivatorUtilitiesConstructor]
public MemberController(
IMemberSignInManager memberSignInManager,
IMemberManager memberManager,
@@ -62,7 +62,6 @@ public static class UmbracoBuilderExtensions
builder.Services.AddTransient<IMemberApplicationManager, MemberApplicationManager>();
builder.Services.AddTransient<IRequestMemberAccessService, RequestMemberAccessService>();
builder.Services.AddTransient<ICurrentMemberClaimsProvider, CurrentMemberClaimsProvider>();
builder.Services.AddScoped<IMemberClientCredentialsManager, MemberClientCredentialsManager>();
builder.Services.ConfigureOptions<ConfigureUmbracoDeliveryApiSwaggerGenOptions>();
builder.AddUmbracoApiOpenApiUI();
@@ -91,7 +91,7 @@ internal sealed class InitializeMemberApplicationNotificationHandler : INotifica
}
}
private bool ValidateRedirectUrls(Uri[] redirectUrls)
private bool ValidateRedirectUrls(IEnumerable<Uri> redirectUrls)
{
if (redirectUrls.Any() is false)
{
@@ -37,12 +37,12 @@ public abstract class ContainsFilterBase : IFilterHandler
{
GroupCollection groups = QueryParserRegex.Match(filter).Groups;
if (groups.Count != 3 || groups.ContainsKey("operator") is false || groups.ContainsKey("value") is false)
if (groups.Count != 3 || groups.TryGetValue("operator", out Group? operatorGroup) is false || groups.TryGetValue("value", out Group? valueGroup) is false)
{
return DefaultFilterOption();
}
FilterOperation? filterOperation = ParseFilterOperation(groups["operator"].Value);
FilterOperation? filterOperation = ParseFilterOperation(operatorGroup.Value);
if (filterOperation.HasValue is false)
{
return DefaultFilterOption();
@@ -51,7 +51,7 @@ public abstract class ContainsFilterBase : IFilterHandler
return new FilterOption
{
FieldName = FieldName,
Values = new[] { groups["value"].Value },
Values = [valueGroup.Value],
Operator = filterOperation.Value
};
@@ -79,10 +79,14 @@ internal sealed class ApiContentQueryProvider : IApiContentQueryProvider
return new PagedModel<Guid>();
}
Guid[] items = results
.Where(r => r.Values.ContainsKey(ItemIdFieldName))
.Select(r => Guid.Parse(r.Values[ItemIdFieldName]))
.ToArray();
List<Guid> items = [];
foreach (ISearchResult result in results)
{
if (result.Values.TryGetValue(ItemIdFieldName, out string? value))
{
items.Add(Guid.Parse(value));
}
}
return new PagedModel<Guid>(results.TotalItemCount, items);
}
@@ -16,12 +16,18 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
private readonly IPublishedMediaCache _publishedMediaCache;
private readonly ILogger<ApiMediaQueryService> _logger;
private readonly IMediaNavigationQueryService _mediaNavigationQueryService;
private readonly IPublishedMediaStatusFilteringService _publishedMediaStatusFilteringService;
public ApiMediaQueryService(IPublishedMediaCache publishedMediaCache, ILogger<ApiMediaQueryService> logger, IMediaNavigationQueryService mediaNavigationQueryService)
public ApiMediaQueryService(
IPublishedMediaCache publishedMediaCache,
ILogger<ApiMediaQueryService> logger,
IMediaNavigationQueryService mediaNavigationQueryService,
IPublishedMediaStatusFilteringService publishedMediaStatusFilteringService)
{
_publishedMediaCache = publishedMediaCache;
_logger = logger;
_mediaNavigationQueryService = mediaNavigationQueryService;
_publishedMediaStatusFilteringService = publishedMediaStatusFilteringService;
}
/// <inheritdoc/>
@@ -71,7 +77,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
break;
}
currentChildren = resolvedMedia.Children(null, _publishedMediaCache, _mediaNavigationQueryService);
currentChildren = resolvedMedia.Children(_mediaNavigationQueryService, _publishedMediaStatusFilteringService);
}
return resolvedMedia;
@@ -104,7 +110,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
? mediaCache.GetById(parentKey)
: TryGetByPath(childrenOf, mediaCache);
return parent?.Children(null, _publishedMediaCache, _mediaNavigationQueryService) ?? Array.Empty<IPublishedContent>();
return parent?.Children(_mediaNavigationQueryService, _publishedMediaStatusFilteringService) ?? Array.Empty<IPublishedContent>();
}
private IEnumerable<IPublishedContent>? ApplyFilters(IEnumerable<IPublishedContent> source, IEnumerable<string> filters)
@@ -179,7 +185,7 @@ internal sealed class ApiMediaQueryService : IApiMediaQueryService
}
private Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> PagedResult(IEnumerable<IPublishedContent> children, int skip, int take)
private static Attempt<PagedModel<Guid>, ApiMediaQueryOperationStatus> PagedResult(IEnumerable<IPublishedContent> children, int skip, int take)
{
IPublishedContent[] childrenAsArray = children as IPublishedContent[] ?? children.ToArray();
var result = new PagedModel<Guid>
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Umbraco.Cms.Core.DeliveryApi;
namespace Umbraco.Cms.Api.Delivery.Services;
@@ -11,5 +11,5 @@ internal sealed class RequestPreviewService : RequestHeaderHandler, IRequestPrev
}
/// <inheritdoc />
public bool IsPreview() => GetHeaderValue("Preview") == "true";
public bool IsPreview() => string.Equals(GetHeaderValue("Preview"), "true", StringComparison.OrdinalIgnoreCase);
}
@@ -42,31 +42,42 @@ internal sealed class RequestRedirectService : RoutingServiceBase, IRequestRedir
{
requestedPath = requestedPath.EnsureStartsWith("/");
IPublishedContent? startItem = GetStartItem();
// must append the root content url segment if it is not hidden by config, because
// the URL tracking is based on the actual URL, including the root content url segment
if (_globalSettings.HideTopLevelNodeFromPath == false)
if (_globalSettings.HideTopLevelNodeFromPath == false && startItem?.UrlSegment != null)
{
IPublishedContent? startItem = GetStartItem();
if (startItem?.UrlSegment != null)
{
requestedPath = $"{startItem.UrlSegment.EnsureStartsWith("/")}{requestedPath}";
}
requestedPath = $"{startItem.UrlSegment.EnsureStartsWith("/")}{requestedPath}";
}
var culture = _requestCultureService.GetRequestedCulture();
// append the configured domain content ID to the path if we have a domain bound request,
// because URL tracking registers the tracked url like "{domain content ID}/{content path}"
Uri contentRoute = GetDefaultRequestUri(requestedPath);
DomainAndUri? domainAndUri = GetDomainAndUriForRoute(contentRoute);
if (domainAndUri != null)
// important: redirect URLs are always tracked without trailing slashes
requestedPath = requestedPath.TrimEnd("/");
IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath, culture);
// if a redirect URL was not found, try by appending the start item ID because URL tracking might have tracked
// a redirect with "{root content ID}/{content path}"
if (redirectUrl is null && startItem is not null)
{
requestedPath = GetContentRoute(domainAndUri, contentRoute);
culture ??= domainAndUri.Culture;
redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl($"{startItem.Id}{requestedPath}", culture);
}
// still no redirect URL found - try looking for a configured domain if we have a domain bound request,
// because URL tracking might have tracked a redirect with "{domain content ID}/{content path}"
if (redirectUrl is null)
{
Uri contentRoute = GetDefaultRequestUri(requestedPath);
DomainAndUri? domainAndUri = GetDomainAndUriForRoute(contentRoute);
if (domainAndUri is not null)
{
requestedPath = GetContentRoute(domainAndUri, contentRoute);
culture ??= domainAndUri.Culture;
redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath, culture);
}
}
// important: redirect URLs are always tracked without trailing slashes
IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEnd("/"), culture);
IPublishedContent? content = redirectUrl != null
? _apiPublishedContentCache.GetById(redirectUrl.ContentKey)
: null;
@@ -24,7 +24,7 @@ public class BackOfficeLoginModel
public bool UserIsAlreadyLoggedIn { get; set; }
}
[ApiExplorerSettings(IgnoreApi=true)]
[ApiExplorerSettings(IgnoreApi = true)]
[Route(LoginPath)]
public class BackOfficeLoginController : Controller
{
@@ -51,7 +51,7 @@ public class BackOfficeLoginController : Controller
if (string.IsNullOrEmpty(model.UmbracoUrl))
{
model.UmbracoUrl = _hostingEnvironment.ToAbsolute(Constants.System.DefaultUmbracoPath);
model.UmbracoUrl = _hostingEnvironment.GetBackOfficePath();
}
if (string.IsNullOrEmpty(model.ReturnUrl))
@@ -21,6 +21,7 @@ public abstract class ContentCollectionControllerBase<TContent, TCollectionRespo
protected ContentCollectionControllerBase(IUmbracoMapper mapper) => _mapper = mapper;
[Obsolete("This method is no longer used and will be removed in Umbraco 17.")]
protected IActionResult CollectionResult(ListViewPagedModel<TContent> result)
{
PagedModel<TContent> collectionItemsResult = result.Items;
@@ -47,6 +48,17 @@ public abstract class ContentCollectionControllerBase<TContent, TCollectionRespo
return Ok(pageViewModel);
}
protected IActionResult CollectionResult(List<TCollectionResponseModel> collectionResponseModels, long totalNumberOfItems)
{
var pageViewModel = new PagedViewModel<TCollectionResponseModel>
{
Items = collectionResponseModels,
Total = totalNumberOfItems,
};
return Ok(pageViewModel);
}
protected IActionResult ContentCollectionOperationStatusResult(ContentCollectionOperationStatus status, string type) =>
OperationStatusResult(status, problemDetailsBuilder => status switch
{
@@ -76,6 +76,14 @@ public abstract class ContentControllerBase : ManagementApiControllerBase
.WithTitle("Duplicate name")
.WithDetail("The supplied name is already in use for the same content type.")
.Build()),
ContentEditingOperationStatus.CannotDeleteWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot delete a referenced content item")
.WithDetail("Cannot delete a referenced document, while the setting ContentSettings.DisableDeleteWhenReferenced is enabled.")
.Build()),
ContentEditingOperationStatus.CannotMoveToRecycleBinWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot move a referenced document to the recycle bin")
.WithDetail("Cannot move a referenced document to the recycle bin, while the setting ContentSettings.DisableUnpublishWhenReferenced is enabled.")
.Build()),
ContentEditingOperationStatus.Unknown => StatusCode(
StatusCodes.Status500InternalServerError,
problemDetailsBuilder
@@ -1,4 +1,4 @@
using System.Globalization;
using System.Globalization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -28,7 +28,7 @@ public class AllCultureController : CultureControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<CultureReponseModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<CultureReponseModel>> GetAll(CancellationToken cancellationToken, int skip = 0, int take = 100)
public Task<PagedViewModel<CultureReponseModel>> GetAll(CancellationToken cancellationToken, int skip = 0, int take = 100)
{
CultureInfo[] all = _cultureService.GetValidCultureInfos();
@@ -38,6 +38,6 @@ public class AllCultureController : CultureControllerBase
Total = all.Length
};
return await Task.FromResult(viewModel);
return Task.FromResult(viewModel);
}
}
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DataType;
@@ -7,10 +8,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class CopyDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -8,10 +9,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class CreateDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
@@ -6,10 +7,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class DeleteDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DataType;
@@ -7,10 +8,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class MoveDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -0,0 +1,46 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.DataType.References;
[ApiVersion("1.0")]
public class ReferencedByDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByDataTypeController(IDataTypeService dataTypeService, IRelationTypePresentationFactory relationTypePresentationFactory)
{
_dataTypeService = dataTypeService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of references for the current data type, so you can see where it is being used.
/// </summary>
[HttpGet("{id:guid}/referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
Guid id,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _dataTypeService.GetPagedRelationsAsync(id, skip, take);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -10,6 +10,7 @@ using Umbraco.Cms.Core.Services.OperationStatus;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Obsolete("Please use ReferencedByDataTypeController and the referenced-by endpoint. Scheduled for removal in Umbraco 17.")]
public class ReferencesDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,5 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -8,10 +9,12 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DataType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDataTypes)]
public class UpdateDataTypeController : DataTypeControllerBase
{
private readonly IDataTypeService _dataTypeService;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Mapping;
@@ -38,6 +38,6 @@ public class AllDictionaryController : DictionaryControllerBase
Total = items.Length,
Items = _umbracoMapper.MapEnumerable<IDictionaryItem, DictionaryOverviewResponseModel>(items.Skip(skip).Take(take))
};
return await Task.FromResult(model);
return model;
}
}
@@ -28,7 +28,7 @@ public class DictionaryTreeControllerBase : NamedEntityTreeControllerBase<NamedE
protected IDictionaryItemService DictionaryItemService { get; }
protected async Task<IEnumerable<NamedEntityTreeItemResponseModel>> MapTreeItemViewModels(IEnumerable<IDictionaryItem> dictionaryItems)
=> await Task.WhenAll(dictionaryItems.Select(CreateEntityTreeItemViewModelAsync));
=> await MapTreeItemViewModelsAsync(dictionaryItems).ToArrayAsync();
protected override async Task<ActionResult<IEnumerable<NamedEntityTreeItemResponseModel>>> GetAncestors(Guid descendantKey, bool includeSelf = true)
{
@@ -54,10 +54,19 @@ public class DictionaryTreeControllerBase : NamedEntityTreeControllerBase<NamedE
}
}
NamedEntityTreeItemResponseModel[] viewModels = await Task.WhenAll(ancestors.Select(CreateEntityTreeItemViewModelAsync));
NamedEntityTreeItemResponseModel[] viewModels = await MapTreeItemViewModelsAsync(ancestors).ToArrayAsync();
return Ok(viewModels.Reverse());
}
private async IAsyncEnumerable<NamedEntityTreeItemResponseModel> MapTreeItemViewModelsAsync(IEnumerable<IDictionaryItem> dictionaryItems)
{
foreach (IDictionaryItem dictionaryItem in dictionaryItems)
{
yield return await CreateEntityTreeItemViewModelAsync(dictionaryItem);
}
}
private async Task<NamedEntityTreeItemResponseModel> CreateEntityTreeItemViewModelAsync(IDictionaryItem dictionaryItem)
{
var hasChildren = await DictionaryItemService.CountChildrenAsync(dictionaryItem.Key) > 0;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -53,6 +53,7 @@ public class ByKeyPublishedDocumentController : DocumentControllerBase
}
PublishedDocumentResponseModel model = await _documentPresentationFactory.CreatePublishedResponseModelAsync(content);
return Ok(model);
}
}
@@ -2,6 +2,7 @@ using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document.Collection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
@@ -17,15 +18,18 @@ public class ByKeyDocumentCollectionController : DocumentCollectionControllerBas
{
private readonly IContentListViewService _contentListViewService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IDocumentCollectionPresentationFactory _documentCollectionPresentationFactory;
public ByKeyDocumentCollectionController(
IContentListViewService contentListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper)
IUmbracoMapper mapper,
IDocumentCollectionPresentationFactory documentCollectionPresentationFactory)
: base(mapper)
{
_contentListViewService = contentListViewService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_documentCollectionPresentationFactory = documentCollectionPresentationFactory;
}
[HttpGet("{id:guid}")]
@@ -55,8 +59,12 @@ public class ByKeyDocumentCollectionController : DocumentCollectionControllerBas
skip,
take);
return collectionAttempt.Success
? CollectionResult(collectionAttempt.Result!)
: CollectionOperationStatusResult(collectionAttempt.Status);
if (collectionAttempt.Success is false)
{
return CollectionOperationStatusResult(collectionAttempt.Status);
}
List<DocumentCollectionResponseModel> collectionResponseModels = await _documentCollectionPresentationFactory.CreateCollectionModelAsync(collectionAttempt.Result!);
return CollectionResult(collectionResponseModels, collectionAttempt.Result!.Items.Total);
}
}
@@ -18,21 +18,18 @@ public abstract class CreateDocumentControllerBase : DocumentControllerBase
protected async Task<IActionResult> HandleRequest(CreateDocumentRequestModel requestModel, Func<Task<IActionResult>> authorizedHandler)
{
// TODO This have temporarily been uncommented, to support the client sends values from all cultures, even when the user do not have access to the languages.
// The values are ignored in the ContentEditingService
// We intentionally don't pass in cultures here.
// This is to support the client sending values for all cultures even if the user doesn't have access to the language.
// Values for unauthorized languages are later ignored in the ContentEditingService.
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionNew.ActionLetter, requestModel.Parent?.Id),
AuthorizationPolicies.ContentPermissionByResource);
// IEnumerable<string> cultures = requestModel.Variants
// .Where(v => v.Culture is not null)
// .Select(v => v.Culture!);
// AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
// User,
// ContentPermissionResource.WithKeys(ActionNew.ActionLetter, requestModel.Parent?.Id, cultures),
// AuthorizationPolicies.ContentPermissionByResource);
//
// if (!authorizationResult.Succeeded)
// {
// return Forbidden();
// }
if (authorizationResult.Succeeded is false)
{
return Forbidden();
}
return await authorizedHandler();
}
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Controllers.Content;
@@ -121,6 +121,11 @@ public abstract class DocumentControllerBase : ContentControllerBase
.WithDetail(
"Cannot handle an unpublish time that is not after the current server time.")
.Build()),
ContentPublishingOperationStatus.CannotUnpublishWhenReferenced => BadRequest(problemDetailsBuilder
.WithTitle("Cannot unpublish document when it's referenced somewhere else.")
.WithDetail(
"Cannot unpublish a referenced document, while the setting ContentSettings.DisableUnpublishWhenReferenced is enabled.")
.Build()),
ContentPublishingOperationStatus.FailedBranch => BadRequest(problemDetailsBuilder
.WithTitle("Failed branch operation")
.WithDetail("One or more items in the branch could not complete the operation.")
@@ -135,6 +140,10 @@ public abstract class DocumentControllerBase : ContentControllerBase
.WithDetail(
"An unspecified error occurred while (un)publishing. Please check the logs for additional information.")
.Build()),
ContentPublishingOperationStatus.TaskResultNotFound => NotFound(problemDetailsBuilder
.WithTitle("The result of the submitted task could not be found")
.Build()),
_ => StatusCode(StatusCodes.Status500InternalServerError, "Unknown content operation status."),
});
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -24,13 +24,13 @@ public class ItemDocumentItemController : DocumentItemControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Item(
public Task<IActionResult> Item(
CancellationToken cancellationToken,
[FromQuery(Name = "id")] HashSet<Guid> ids)
{
if (ids.Count is 0)
{
return Ok(Enumerable.Empty<DocumentItemResponseModel>());
return Task.FromResult<IActionResult>(Ok(Enumerable.Empty<DocumentItemResponseModel>()));
}
IEnumerable<IDocumentEntitySlim> documents = _entityService
@@ -38,6 +38,6 @@ public class ItemDocumentItemController : DocumentItemControllerBase
.OfType<IDocumentEntitySlim>();
IEnumerable<DocumentItemResponseModel> documentItemResponseModels = documents.Select(_documentPresentationFactory.CreateItemResponseModel);
return await Task.FromResult(Ok(documentItemResponseModels));
return Task.FromResult<IActionResult>(Ok(documentItemResponseModels));
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -21,23 +21,25 @@ public class SearchDocumentItemController : DocumentItemControllerBase
_documentPresentationFactory = documentPresentationFactory;
}
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchFromParent(cancellationToken, query, skip, take);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<DocumentItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
public Task<IActionResult> SearchWithTrashed(
CancellationToken cancellationToken,
string query,
bool? trashed = null,
int skip = 0,
int take = 100,
Guid? parentId = null,
[FromQuery] IEnumerable<Guid>? allowedDocumentTypes = null)
{
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Document, query, parentId, skip, take);
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Document, query, parentId, allowedDocumentTypes, trashed, skip, take);
var result = new PagedModel<DocumentItemResponseModel>
{
Items = searchResult.Items.OfType<IDocumentEntitySlim>().Select(_documentPresentationFactory.CreateItemResponseModel),
Total = searchResult.Total,
};
return await Task.FromResult(Ok(result));
return Task.FromResult<IActionResult>(Ok(result));
}
}
@@ -1,11 +1,11 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Security.Authorization.Content;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.ContentPublishing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Security.Authorization;
@@ -35,7 +35,7 @@ public class PublishDocumentWithDescendantsController : DocumentControllerBase
[HttpPut("{id:guid}/publish-with-descendants")]
[MapToApiVersion("1.0")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(typeof(PublishWithDescendantsResultModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> PublishWithDescendants(CancellationToken cancellationToken, Guid id, PublishDocumentWithDescendantsRequestModel requestModel)
@@ -53,11 +53,27 @@ public class PublishDocumentWithDescendantsController : DocumentControllerBase
Attempt<ContentPublishingBranchResult, ContentPublishingOperationStatus> attempt = await _contentPublishingService.PublishBranchAsync(
id,
requestModel.Cultures,
requestModel.IncludeUnpublishedDescendants,
CurrentUserKey(_backOfficeSecurityAccessor));
BuildPublishBranchFilter(requestModel),
CurrentUserKey(_backOfficeSecurityAccessor),
true);
return attempt.Success
? Ok()
return attempt.Success && attempt.Result.AcceptedTaskId.HasValue
? Ok(new PublishWithDescendantsResultModel
{
TaskId = attempt.Result.AcceptedTaskId.Value,
IsComplete = false
})
: DocumentPublishingOperationStatusResult(attempt.Status, failedBranchItems: attempt.Result.FailedItems);
}
private static PublishBranchFilter BuildPublishBranchFilter(PublishDocumentWithDescendantsRequestModel requestModel)
{
PublishBranchFilter publishBranchFilter = PublishBranchFilter.Default;
if (requestModel.IncludeUnpublishedDescendants)
{
publishBranchFilter |= PublishBranchFilter.IncludeUnpublished;
}
return publishBranchFilter;
}
}
@@ -0,0 +1,69 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models.ContentPublishing;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.Document;
[ApiVersion("1.0")]
public class PublishDocumentWithDescendantsResultController : DocumentControllerBase
{
private readonly IAuthorizationService _authorizationService;
private readonly IContentPublishingService _contentPublishingService;
public PublishDocumentWithDescendantsResultController(
IAuthorizationService authorizationService,
IContentPublishingService contentPublishingService)
{
_authorizationService = authorizationService;
_contentPublishingService = contentPublishingService;
}
[HttpGet("{id:guid}/publish-with-descendants/result/{taskId:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PublishWithDescendantsResultModel), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<IActionResult> PublishWithDescendantsResult(CancellationToken cancellationToken, Guid id, Guid taskId)
{
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.Branch(ActionPublish.ActionLetter, id),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
{
return Forbidden();
}
// Check if the publishing task has completed, if not, return the status.
var isPublishing = await _contentPublishingService.IsPublishingBranchAsync(taskId);
if (isPublishing)
{
return Ok(new PublishWithDescendantsResultModel
{
TaskId = taskId,
IsComplete = false
});
};
// If completed, get the result and return the status.
Attempt<ContentPublishingBranchResult, ContentPublishingOperationStatus> attempt = await _contentPublishingService.GetPublishBranchResultAsync(taskId);
return attempt.Success
? Ok(new PublishWithDescendantsResultModel
{
TaskId = taskId,
IsComplete = true
})
: DocumentPublishingOperationStatusResult(attempt.Status, failedBranchItems: attempt.Result.FailedItems);
}
}
@@ -0,0 +1,50 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.Document.RecycleBin;
[ApiVersion("1.0")]
public class ReferencedByDocumentRecycleBinController : DocumentRecycleBinControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByDocumentRecycleBinController(
IEntityService entityService,
IDocumentPresentationFactory documentPresentationFactory,
ITrackedReferencesService trackedReferencesService,
IRelationTypePresentationFactory relationTypePresentationFactory)
: base(entityService, documentPresentationFactory)
{
_trackedReferencesService = trackedReferencesService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of tracked references for all items in the document recycle bin, so you can see where an item is being used.
/// </summary>
[HttpGet("referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForRecycleBinAsync(UmbracoObjectTypes.Document, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -45,6 +45,6 @@ public class AreReferencedDocumentController : DocumentControllerBase
Items = _umbracoMapper.MapEnumerable<Guid, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -37,7 +37,7 @@ public class ReferencedByDocumentController : DocumentControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, false);
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
@@ -45,6 +45,6 @@ public class ReferencedByDocumentController : DocumentControllerBase
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -45,6 +45,6 @@ public class ReferencedDescendantsDocumentController : DocumentControllerBase
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -4,6 +4,7 @@ using Umbraco.Cms.Api.Management.Controllers.Tree;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.Routing;
using Umbraco.Cms.Api.Management.Services.Entities;
using Umbraco.Cms.Api.Management.ViewModels;
using Umbraco.Cms.Api.Management.ViewModels.Tree;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
@@ -33,7 +34,7 @@ public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBa
AppCaches appCaches,
IBackOfficeSecurityAccessor backofficeSecurityAccessor,
IDocumentPresentationFactory documentPresentationFactory)
: base(entityService, userStartNodeEntitiesService, dataTypeService)
: base(entityService, userStartNodeEntitiesService, dataTypeService)
{
_publicAccessService = publicAccessService;
_appCaches = appCaches;
@@ -52,6 +53,8 @@ public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBa
if (entity is IDocumentEntitySlim documentEntitySlim)
{
responseModel.IsProtected = _publicAccessService.IsProtected(entity.Path);
responseModel.Ancestors = EntityService.GetPathKeys(entity, omitSelf: true)
.Select(x => new ReferenceByIdModel(x));
responseModel.IsTrashed = entity.Trashed;
responseModel.Id = entity.Key;
responseModel.CreateDate = entity.CreateDate;
@@ -17,21 +17,18 @@ public abstract class UpdateDocumentControllerBase : DocumentControllerBase
protected async Task<IActionResult> HandleRequest(Guid id, UpdateDocumentRequestModel requestModel, Func<Task<IActionResult>> authorizedHandler)
{
// TODO This have temporarily been uncommented, to support the client sends values from all cultures, even when the user do not have access to the languages.
// The values are ignored in the ContentEditingService
// We intentionally don't pass in cultures here.
// This is to support the client sending values for all cultures even if the user doesn't have access to the language.
// Values for unauthorized languages are later ignored in the ContentEditingService.
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionUpdate.ActionLetter, id),
AuthorizationPolicies.ContentPermissionByResource);
// IEnumerable<string> cultures = requestModel.Variants
// .Where(v => v.Culture is not null)
// .Select(v => v.Culture!);
// AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
// User,
// ContentPermissionResource.WithKeys(ActionUpdate.ActionLetter, id, cultures),
// AuthorizationPolicies.ContentPermissionByResource);
//
// if (!authorizationResult.Succeeded)
// {
// return Forbidden();
// }
if (authorizationResult.Succeeded is false)
{
return Forbidden();
}
return await authorizedHandler();
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.Document;
@@ -35,6 +35,6 @@ public class UpdateNotificationsController : DocumentControllerBase
}
_notificationService.SetNotifications(_backOfficeSecurityAccessor.BackOfficeSecurity?.CurrentUser, content, updateModel.SubscribedActionIds);
return await Task.FromResult(Ok());
return Ok();
}
}
@@ -1,11 +1,14 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
@@ -16,15 +19,32 @@ public class ValidateCreateDocumentController : CreateDocumentControllerBase
{
private readonly IDocumentEditingPresentationFactory _documentEditingPresentationFactory;
private readonly IContentEditingService _contentEditingService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public ValidateCreateDocumentController(
IAuthorizationService authorizationService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IContentEditingService contentEditingService)
: this(
authorizationService,
documentEditingPresentationFactory,
contentEditingService,
StaticServiceProvider.Instance.GetRequiredService<IBackOfficeSecurityAccessor>())
{
}
[ActivatorUtilitiesConstructor]
public ValidateCreateDocumentController(
IAuthorizationService authorizationService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IContentEditingService contentEditingService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
: base(authorizationService)
{
_documentEditingPresentationFactory = documentEditingPresentationFactory;
_contentEditingService = contentEditingService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
}
[HttpPost("validate")]
@@ -36,7 +56,10 @@ public class ValidateCreateDocumentController : CreateDocumentControllerBase
=> await HandleRequest(requestModel, async () =>
{
ContentCreateModel model = _documentEditingPresentationFactory.MapCreateModel(requestModel);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result = await _contentEditingService.ValidateCreateAsync(model);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result =
await _contentEditingService.ValidateCreateAsync(
model,
CurrentUserKey(_backOfficeSecurityAccessor));
return result.Success
? Ok()
@@ -1,58 +1,52 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Document;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
namespace Umbraco.Cms.Api.Management.Controllers.Document;
[ApiVersion("1.0")]
[ApiVersion("1.1")]
public class ValidateUpdateDocumentController : UpdateDocumentControllerBase
{
private readonly IContentEditingService _contentEditingService;
private readonly IDocumentEditingPresentationFactory _documentEditingPresentationFactory;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
[Obsolete("Please use the constructor taking all parameters. Scheduled for removal in Umbraco 17.")]
public ValidateUpdateDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory)
: this(
authorizationService,
contentEditingService,
documentEditingPresentationFactory,
StaticServiceProvider.Instance.GetRequiredService<IBackOfficeSecurityAccessor>())
{
}
[ActivatorUtilitiesConstructor]
public ValidateUpdateDocumentController(
IAuthorizationService authorizationService,
IContentEditingService contentEditingService,
IDocumentEditingPresentationFactory documentEditingPresentationFactory,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
: base(authorizationService)
{
_contentEditingService = contentEditingService;
_documentEditingPresentationFactory = documentEditingPresentationFactory;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
}
[HttpPut("{id:guid}/validate")]
[MapToApiVersion("1.0")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
[Obsolete("Please use version 1.1 of this API. Will be removed in V16.")]
public async Task<IActionResult> Validate(CancellationToken cancellationToken, Guid id, UpdateDocumentRequestModel requestModel)
=> await HandleRequest(id, requestModel, async () =>
{
var validateUpdateDocumentRequestModel = new ValidateUpdateDocumentRequestModel
{
Values = requestModel.Values,
Variants = requestModel.Variants,
Template = requestModel.Template,
Cultures = null
};
ValidateContentUpdateModel model = _documentEditingPresentationFactory.MapValidateUpdateModel(validateUpdateDocumentRequestModel);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result = await _contentEditingService.ValidateUpdateAsync(id, model);
return result.Success
? Ok()
: DocumentEditingOperationStatusResult(result.Status, requestModel, result.Result);
});
[HttpPut("{id:guid}/validate")]
[MapToApiVersion("1.1")]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -62,7 +56,11 @@ public class ValidateUpdateDocumentController : UpdateDocumentControllerBase
=> await HandleRequest(id, requestModel, async () =>
{
ValidateContentUpdateModel model = _documentEditingPresentationFactory.MapValidateUpdateModel(requestModel);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result = await _contentEditingService.ValidateUpdateAsync(id, model);
Attempt<ContentValidationResult, ContentEditingOperationStatus> result =
await _contentEditingService.ValidateUpdateAsync(
id,
model,
CurrentUserKey(_backOfficeSecurityAccessor));
return result.Success
? Ok()
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -25,13 +25,13 @@ public class ItemDocumentBlueprintController : DocumentBlueprintItemControllerBa
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentBlueprintItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Item(
public Task<IActionResult> Item(
CancellationToken cancellationToken,
[FromQuery(Name = "id")] HashSet<Guid> ids)
{
if (ids.Count is 0)
{
return Ok(Enumerable.Empty<DocumentBlueprintItemResponseModel>());
return Task.FromResult<IActionResult>(Ok(Enumerable.Empty<DocumentBlueprintItemResponseModel>()));
}
IEnumerable<IDocumentEntitySlim> documents = _entityService
@@ -39,6 +39,6 @@ public class ItemDocumentBlueprintController : DocumentBlueprintItemControllerBa
.Select(x => x as IDocumentEntitySlim)
.WhereNotNull();
IEnumerable<DocumentBlueprintItemResponseModel> responseModels = documents.Select(x => _documentPresentationFactory.CreateBlueprintItemResponseModel(x));
return await Task.FromResult(Ok(responseModels));
return Task.FromResult<IActionResult>(Ok(responseModels));
}
}
@@ -1,5 +1,4 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -9,7 +8,6 @@ using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
@@ -32,10 +30,11 @@ public class AllowedChildrenDocumentTypeController : DocumentTypeControllerBase
public async Task<IActionResult> AllowedChildrenByKey(
CancellationToken cancellationToken,
Guid id,
Guid? parentContentKey = null,
int skip = 0,
int take = 100)
{
Attempt<PagedModel<IContentType>?, ContentTypeOperationStatus> attempt = await _contentTypeService.GetAllowedChildrenAsync(id, skip, take);
Attempt<PagedModel<IContentType>?, ContentTypeOperationStatus> attempt = await _contentTypeService.GetAllowedChildrenAsync(id, parentContentKey, skip, take);
if (attempt.Success is false)
{
return OperationStatusResult(attempt.Status);
@@ -1,14 +1,9 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Features;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
@@ -19,30 +14,8 @@ public class ConfigurationDocumentTypeController : DocumentTypeControllerBase
{
private readonly IConfigurationPresentationFactory _configurationPresentationFactory;
[ActivatorUtilitiesConstructor]
public ConfigurationDocumentTypeController(IConfigurationPresentationFactory configurationPresentationFactory)
{
_configurationPresentationFactory = configurationPresentationFactory;
}
[Obsolete("Use the constructor that only accepts IConfigurationPresentationFactory, scheduled for removal in V16")]
public ConfigurationDocumentTypeController(
UmbracoFeatures umbracoFeatures,
IOptionsSnapshot<DataTypesSettings> dataTypesSettings,
IOptionsSnapshot<SegmentSettings> segmentSettings,
IConfigurationPresentationFactory configurationPresentationFactory)
: this(configurationPresentationFactory)
{
}
[Obsolete("Use the constructor that only accepts IConfigurationPresentationFactory, scheduled for removal in V16")]
public ConfigurationDocumentTypeController(
UmbracoFeatures umbracoFeatures,
IOptionsSnapshot<DataTypesSettings> dataTypesSettings,
IOptionsSnapshot<SegmentSettings> segmentSettings)
: this(StaticServiceProvider.Instance.GetRequiredService<IConfigurationPresentationFactory>())
{
}
=> _configurationPresentationFactory = configurationPresentationFactory;
[HttpGet("configuration")]
[MapToApiVersion("1.0")]
@@ -1,14 +1,17 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ExportDocumentTypeController : DocumentTypeControllerBase
{
private readonly IContentTypeService _contentTypeService;
@@ -1,17 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ImportExistingDocumentTypeController : DocumentTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
@@ -1,17 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
public class ImportNewDocumentTypeController : DocumentTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType.Item;
@@ -23,17 +23,17 @@ public class ItemDocumentTypeItemController : DocumentTypeItemControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentTypeItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Item(
public Task<IActionResult> Item(
CancellationToken cancellationToken,
[FromQuery(Name = "id")] HashSet<Guid> ids)
{
if (ids.Count is 0)
{
return Ok(Enumerable.Empty<DocumentTypeItemResponseModel>());
return Task.FromResult<IActionResult>(Ok(Enumerable.Empty<DocumentTypeItemResponseModel>()));
}
IEnumerable<IContentType> contentTypes = _contentTypeService.GetMany(ids);
List<DocumentTypeItemResponseModel> responseModels = _mapper.MapEnumerable<IContentType, DocumentTypeItemResponseModel>(contentTypes);
return await Task.FromResult(Ok(responseModels));
return Task.FromResult<IActionResult>(Ok(responseModels));
}
}
@@ -1,45 +1,60 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Api.Management.ViewModels.DocumentType.Item;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
using Umbraco.Cms.Core.Services;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType.Item;
[ApiVersion("1.0")]
public class SearchDocumentTypeItemController : DocumentTypeItemControllerBase
{
private readonly IEntitySearchService _entitySearchService;
private readonly IContentTypeService _contentTypeService;
private readonly IUmbracoMapper _mapper;
private readonly IContentTypeSearchService _contentTypeSearchService;
[Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")]
public SearchDocumentTypeItemController(IEntitySearchService entitySearchService, IContentTypeService contentTypeService, IUmbracoMapper mapper)
: this(mapper, StaticServiceProvider.Instance.GetRequiredService<IContentTypeSearchService>())
{
_entitySearchService = entitySearchService;
_contentTypeService = contentTypeService;
_mapper = mapper;
}
[Obsolete("Please use ctor that only accepts IUmbracoMapper & IContentTypeSearchService, scheduled for removal in v17")]
// We need to have this constructor, or else we get ambiguous constructor error
public SearchDocumentTypeItemController(
IEntitySearchService entitySearchService,
IContentTypeService contentTypeService,
IUmbracoMapper mapper,
IContentTypeSearchService contentTypeSearchService)
: this(mapper, contentTypeSearchService)
{
}
[ActivatorUtilitiesConstructor]
public SearchDocumentTypeItemController(IUmbracoMapper mapper, IContentTypeSearchService contentTypeSearchService)
{
_mapper = mapper;
_contentTypeSearchService = contentTypeSearchService;
}
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchDocumentType(cancellationToken, query, null, skip, take);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<DocumentTypeItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
public async Task<IActionResult> SearchDocumentType(CancellationToken cancellationToken, string query, bool? isElement = null, int skip = 0, int take = 100)
{
PagedModel<IEntitySlim> searchResult = _entitySearchService.Search(UmbracoObjectTypes.DocumentType, query, skip, take);
if (searchResult.Items.Any() is false)
{
return await Task.FromResult(Ok(new PagedModel<DocumentTypeItemResponseModel> { Total = searchResult.Total }));
}
IEnumerable<IContentType> contentTypes = _contentTypeService.GetMany(searchResult.Items.Select(item => item.Key).ToArray().EmptyNull());
PagedModel<IContentType> contentTypes = await _contentTypeSearchService.SearchAsync(query, isElement, cancellationToken, skip, take);
var result = new PagedModel<DocumentTypeItemResponseModel>
{
Items = _mapper.MapEnumerable<IContentType, DocumentTypeItemResponseModel>(contentTypes),
Total = searchResult.Total
Items = _mapper.MapEnumerable<IContentType, DocumentTypeItemResponseModel>(contentTypes.Items),
Total = contentTypes.Total
};
return Ok(result);
@@ -1,10 +1,16 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Actions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
using Umbraco.Extensions;
namespace Umbraco.Cms.Api.Management.Controllers.DocumentVersion;
@@ -13,13 +19,16 @@ public class RollbackDocumentVersionController : DocumentVersionControllerBase
{
private readonly IContentVersionService _contentVersionService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IAuthorizationService _authorizationService;
public RollbackDocumentVersionController(
IContentVersionService contentVersionService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor)
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IAuthorizationService authorizationService)
{
_contentVersionService = contentVersionService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_authorizationService = authorizationService;
}
[MapToApiVersion("1.0")]
@@ -29,11 +38,29 @@ public class RollbackDocumentVersionController : DocumentVersionControllerBase
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Rollback(CancellationToken cancellationToken, Guid id, string? culture)
{
Attempt<ContentVersionOperationStatus> attempt =
Attempt<IContent?, ContentVersionOperationStatus> getContentAttempt =
await _contentVersionService.GetAsync(id);
if (getContentAttempt.Success is false || getContentAttempt.Result is null)
{
return MapFailure(getContentAttempt.Status);
}
IContent content = getContentAttempt.Result;
AuthorizationResult authorizationResult = await _authorizationService.AuthorizeResourceAsync(
User,
ContentPermissionResource.WithKeys(ActionRollback.ActionLetter, content.Key),
AuthorizationPolicies.ContentPermissionByResource);
if (!authorizationResult.Succeeded)
{
return Forbidden();
}
Attempt<ContentVersionOperationStatus> rollBackAttempt =
await _contentVersionService.RollBackAsync(id, culture, CurrentUserKey(_backOfficeSecurityAccessor));
return attempt.Success
return rollBackAttempt.Success
? Ok()
: MapFailure(attempt.Result);
: MapFailure(rollBackAttempt.Result);
}
}
@@ -21,10 +21,10 @@ public class GetQueryStepsController : DynamicRootControllerBase
[HttpGet($"steps")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<string>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetQuerySteps(CancellationToken cancellationToken)
public Task<IActionResult> GetQuerySteps(CancellationToken cancellationToken)
{
IEnumerable<string> querySteps = _dynamicRootQueryStepCollection.Select(x => x.SupportedDirectionAlias);
return await Task.FromResult(Ok(querySteps));
return Task.FromResult<IActionResult>(Ok(querySteps));
}
}
@@ -61,8 +61,8 @@ public class ExecuteActionHealthCheckController : HealthCheckControllerBase
return BadRequest(invalidModelProblem);
}
HealthCheckStatus result = healthCheck.ExecuteAction(_umbracoMapper.Map<HealthCheckAction>(action)!);
HealthCheckStatus result = await healthCheck.ExecuteActionAsync(_umbracoMapper.Map<HealthCheckAction>(action)!);
return await Task.FromResult(Ok(_umbracoMapper.Map<HealthCheckResultResponseModel>(result)));
return Ok(_umbracoMapper.Map<HealthCheckResultResponseModel>(result));
}
}
@@ -31,7 +31,7 @@ public class AllHealthCheckGroupController : HealthCheckGroupControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<HealthCheckGroupResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<HealthCheckGroupResponseModel>>> All(
public Task<ActionResult<PagedViewModel<HealthCheckGroupResponseModel>>> All(
CancellationToken cancellationToken,
int skip = 0,
int take = 100)
@@ -46,6 +46,6 @@ public class AllHealthCheckGroupController : HealthCheckGroupControllerBase
Items = _umbracoMapper.MapEnumerable<IGrouping<string?, Core.HealthChecks.HealthCheck>, HealthCheckGroupResponseModel>(groups.Skip(skip).Take(take))
};
return await Task.FromResult(Ok(viewModel));
return Task.FromResult<ActionResult<PagedViewModel<HealthCheckGroupResponseModel>>>(Ok(viewModel));
}
}
@@ -31,7 +31,7 @@ public class ByNameHealthCheckGroupController : HealthCheckGroupControllerBase
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
[ProducesResponseType(typeof(HealthCheckGroupPresentationModel), StatusCodes.Status200OK)]
public async Task<IActionResult> ByName(
public Task<IActionResult> ByName(
CancellationToken cancellationToken,
string name)
{
@@ -42,9 +42,9 @@ public class ByNameHealthCheckGroupController : HealthCheckGroupControllerBase
if (group is null)
{
return HealthCheckGroupNotFound();
return Task.FromResult(HealthCheckGroupNotFound());
}
return await Task.FromResult(Ok(_umbracoMapper.Map<HealthCheckGroupPresentationModel>(group)));
return Task.FromResult<IActionResult>(Ok(_umbracoMapper.Map<HealthCheckGroupPresentationModel>(group)));
}
}
@@ -39,6 +39,6 @@ public class CheckHealthCheckGroupController : HealthCheckGroupControllerBase
return HealthCheckGroupNotFound();
}
return await Task.FromResult(Ok(_healthCheckGroupPresentationFactory.CreateHealthCheckGroupWithResultViewModel(group)));
return Ok(await _healthCheckGroupPresentationFactory.CreateHealthCheckGroupWithResultViewModelAsync(group));
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
@@ -82,6 +82,5 @@ public class GetHelpController : HelpControllerBase
return Ok(PagedViewModel<HelpPageResponseModel>.Empty());
}
private bool IsAllowedUrl(string? url) =>
_helpPageSettings.HelpPageUrlAllowList is null || _helpPageSettings.HelpPageUrlAllowList.Contains(url);
private bool IsAllowedUrl(string? url) => url is null || _helpPageSettings.HelpPageUrlAllowList.Contains(url);
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Examine;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -34,11 +34,11 @@ public class DetailsIndexerController : IndexerControllerBase
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(IndexResponseModel), StatusCodes.Status200OK)]
public async Task<ActionResult<IndexResponseModel?>> Details(CancellationToken cancellationToken, string indexName)
public Task<ActionResult<IndexResponseModel?>> Details(CancellationToken cancellationToken, string indexName)
{
if (_examineManager.TryGetIndex(indexName, out IIndex? index))
{
return await Task.FromResult(_indexPresentationFactory.Create(index!));
return Task.FromResult<ActionResult<IndexResponseModel?>>(_indexPresentationFactory.Create(index));
}
var invalidModelProblem = new ProblemDetails
@@ -49,7 +49,6 @@ public class DetailsIndexerController : IndexerControllerBase
Type = "Error",
};
return await Task.FromResult(NotFound(invalidModelProblem));
return Task.FromResult<ActionResult<IndexResponseModel?>>(NotFound(invalidModelProblem));
}
}
@@ -36,7 +36,7 @@ public class RebuildIndexerController : IndexerControllerBase
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> Rebuild(CancellationToken cancellationToken, string indexName)
public Task<IActionResult> Rebuild(CancellationToken cancellationToken, string indexName)
{
if (!_examineManager.TryGetIndex(indexName, out IIndex? index))
{
@@ -48,7 +48,7 @@ public class RebuildIndexerController : IndexerControllerBase
Type = "Error",
};
return await Task.FromResult(NotFound(invalidModelProblem));
return Task.FromResult<IActionResult>(NotFound(invalidModelProblem));
}
if (!_indexingRebuilderService.CanRebuild(index.Name))
@@ -62,14 +62,14 @@ public class RebuildIndexerController : IndexerControllerBase
Type = "Error",
};
return await Task.FromResult(BadRequest(invalidModelProblem));
return Task.FromResult<IActionResult>(BadRequest(invalidModelProblem));
}
_logger.LogInformation("Rebuilding index '{IndexName}'", indexName);
if (_indexingRebuilderService.TryRebuild(index, indexName))
{
return await Task.FromResult(Ok());
return Task.FromResult<IActionResult>(Ok());
}
var problemDetails = new ProblemDetails
@@ -80,6 +80,6 @@ public class RebuildIndexerController : IndexerControllerBase
Type = "Error",
};
return await Task.FromResult(Conflict(problemDetails));
return Task.FromResult<IActionResult>(Conflict(problemDetails));
}
}
@@ -30,7 +30,7 @@ public class AllSinkLevelLogViewerController : LogViewerControllerBase
[HttpGet("level")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<LoggerResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<LoggerResponseModel>>> AllLogLevels(
public Task<ActionResult<PagedViewModel<LoggerResponseModel>>> AllLogLevels(
CancellationToken cancellationToken,
int skip = 0,
int take = 100)
@@ -45,6 +45,6 @@ public class AllSinkLevelLogViewerController : LogViewerControllerBase
Items = _umbracoMapper.MapEnumerable<KeyValuePair<string, LogLevel>, LoggerResponseModel>(logLevels.Skip(skip).Take(take))
};
return await Task.FromResult(Ok(viewModel));
return Task.FromResult<ActionResult<PagedViewModel<LoggerResponseModel>>>(Ok(viewModel));
}
}
@@ -2,6 +2,7 @@ using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.Media.Collection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Mapping;
@@ -17,15 +18,18 @@ public class ByKeyMediaCollectionController : MediaCollectionControllerBase
{
private readonly IMediaListViewService _mediaListViewService;
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
private readonly IMediaCollectionPresentationFactory _mediaCollectionPresentationFactory;
public ByKeyMediaCollectionController(
IMediaListViewService mediaListViewService,
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
IUmbracoMapper mapper)
IUmbracoMapper mapper,
IMediaCollectionPresentationFactory mediaCollectionPresentationFactory)
: base(mapper)
{
_mediaListViewService = mediaListViewService;
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
_mediaCollectionPresentationFactory = mediaCollectionPresentationFactory;
}
[HttpGet]
@@ -53,8 +57,13 @@ public class ByKeyMediaCollectionController : MediaCollectionControllerBase
skip,
take);
return collectionAttempt.Success
? CollectionResult(collectionAttempt.Result!)
: CollectionOperationStatusResult(collectionAttempt.Status);
if (collectionAttempt.Success is false)
{
return CollectionOperationStatusResult(collectionAttempt.Status);
}
List<MediaCollectionResponseModel> collectionResponseModels = await _mediaCollectionPresentationFactory.CreateCollectionModelAsync(collectionAttempt.Result!);
return CollectionResult(collectionResponseModels, collectionAttempt.Result!.Items.Total);
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -7,6 +7,7 @@ using Umbraco.Cms.Api.Management.ViewModels.Media;
namespace Umbraco.Cms.Api.Management.Controllers.Media;
[ApiVersion("1.0")]
[Obsolete("No longer used. Scheduled for removal in Umbraco 18.")]
public class ConfigurationMediaController : MediaControllerBase
{
private readonly IConfigurationPresentationFactory _configurationPresentationFactory;
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -25,13 +25,13 @@ public class ItemMediaItemController : MediaItemControllerBase
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<MediaItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> Item(
public Task<IActionResult> Item(
CancellationToken cancellationToken,
[FromQuery(Name = "id")] HashSet<Guid> ids)
{
if (ids.Count is 0)
{
return Ok(Enumerable.Empty<MediaItemResponseModel>());
return Task.FromResult<IActionResult>(Ok(Enumerable.Empty<MediaItemResponseModel>()));
}
IEnumerable<IMediaEntitySlim> media = _entityService
@@ -39,6 +39,6 @@ public class ItemMediaItemController : MediaItemControllerBase
.OfType<IMediaEntitySlim>();
IEnumerable<MediaItemResponseModel> responseModels = media.Select(_mediaPresentationFactory.CreateItemResponseModel);
return await Task.FromResult(Ok(responseModels));
return Task.FromResult<IActionResult>(Ok(responseModels));
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -23,21 +23,21 @@ public class SearchMediaItemController : MediaItemControllerBase
[NonAction]
[Obsolete("Scheduled to be removed in v16, use the non obsoleted method instead")]
public async Task<IActionResult> Search(CancellationToken cancellationToken, string query, int skip = 0, int take = 100)
=> await SearchFromParent(cancellationToken, query, skip, take, null);
public Task<IActionResult> SearchFromParentWithAllowedTypes(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null, [FromQuery]IEnumerable<Guid>? allowedMediaTypes = null)
=> SearchFromParentWithAllowedTypes(cancellationToken, query, null, skip, take, parentId);
[HttpGet("search")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedModel<MediaItemResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> SearchFromParent(CancellationToken cancellationToken, string query, int skip = 0, int take = 100, Guid? parentId = null)
public Task<IActionResult> SearchFromParentWithAllowedTypes(CancellationToken cancellationToken, string query, bool? trashed = null, int skip = 0, int take = 100, Guid? parentId = null, [FromQuery]IEnumerable<Guid>? allowedMediaTypes = null)
{
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Media, query, parentId, skip, take);
PagedModel<IEntitySlim> searchResult = _indexedEntitySearchService.Search(UmbracoObjectTypes.Media, query, parentId, allowedMediaTypes, trashed, skip, take);
var result = new PagedModel<MediaItemResponseModel>
{
Items = searchResult.Items.OfType<IMediaEntitySlim>().Select(_mediaPresentationFactory.CreateItemResponseModel),
Total = searchResult.Total,
};
return await Task.FromResult(Ok(result));
return Task.FromResult<IActionResult>(Ok(result));
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
@@ -25,10 +25,10 @@ public class MediaUrlController : MediaControllerBase
[MapToApiVersion("1.0")]
[HttpGet("urls")]
[ProducesResponseType(typeof(IEnumerable<MediaUrlInfoResponseModel>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetUrls([FromQuery(Name = "id")] HashSet<Guid> ids)
public Task<IActionResult> GetUrls([FromQuery(Name = "id")] HashSet<Guid> ids)
{
IEnumerable<IMedia> items = _mediaService.GetByIds(ids);
return await Task.FromResult(Ok(_mediaUrlFactory.CreateUrlSets(items)));
return Task.FromResult<IActionResult>(Ok(_mediaUrlFactory.CreateUrlSets(items)));
}
}
@@ -0,0 +1,50 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Api.Management.ViewModels.TrackedReferences;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
namespace Umbraco.Cms.Api.Management.Controllers.Media.RecycleBin;
[ApiVersion("1.0")]
public class ReferencedByMediaRecycleBinController : MediaRecycleBinControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesService;
private readonly IRelationTypePresentationFactory _relationTypePresentationFactory;
public ReferencedByMediaRecycleBinController(
IEntityService entityService,
IMediaPresentationFactory mediaPresentationFactory,
ITrackedReferencesService trackedReferencesService,
IRelationTypePresentationFactory relationTypePresentationFactory)
: base(entityService, mediaPresentationFactory)
{
_trackedReferencesService = trackedReferencesService;
_relationTypePresentationFactory = relationTypePresentationFactory;
}
/// <summary>
/// Gets a paged list of tracked references for all items in the media recycle bin, so you can see where an item is being used.
/// </summary>
[HttpGet("referenced-by")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IReferenceResponseModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<IReferenceResponseModel>>> ReferencedBy(
CancellationToken cancellationToken,
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForRecycleBinAsync(UmbracoObjectTypes.Media, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
Total = relationItems.Total,
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -46,6 +46,6 @@ public class AreReferencedMediaController : MediaControllerBase
Items = _umbracoMapper.MapEnumerable<Guid, ReferenceByIdModel>(distinctByKeyItemsWithReferencedRelations.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -37,7 +37,7 @@ public class ReferencedByMediaController : MediaControllerBase
int skip = 0,
int take = 20)
{
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, false);
PagedModel<RelationItemModel> relationItems = await _trackedReferencesService.GetPagedRelationsForItemAsync(id, skip, take, true);
var pagedViewModel = new PagedViewModel<IReferenceResponseModel>
{
@@ -45,6 +45,6 @@ public class ReferencedByMediaController : MediaControllerBase
Items = await _relationTypePresentationFactory.CreateReferenceResponseModelsAsync(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -45,6 +45,6 @@ public class ReferencedDescendantsMediaController : MediaControllerBase
Items = _umbracoMapper.MapEnumerable<RelationItemModel, ReferenceByIdModel>(relationItems.Items),
};
return await Task.FromResult(pagedViewModel);
return pagedViewModel;
}
}
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Common.ViewModels.Pagination;
@@ -30,10 +30,11 @@ public class AllowedChildrenMediaTypeController : MediaTypeControllerBase
public async Task<IActionResult> AllowedChildrenByKey(
CancellationToken cancellationToken,
Guid id,
Guid? parentContentKey = null,
int skip = 0,
int take = 100)
{
Attempt<PagedModel<IMediaType>?, ContentTypeOperationStatus> attempt = await _mediaTypeService.GetAllowedChildrenAsync(id, skip, take);
Attempt<PagedModel<IMediaType>?, ContentTypeOperationStatus> attempt = await _mediaTypeService.GetAllowedChildrenAsync(id, parentContentKey, skip, take);
if (attempt.Success is false)
{
return OperationStatusResult(attempt.Status);
@@ -1,4 +1,4 @@
using Asp.Versioning;
using Asp.Versioning;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.MediaType;
@@ -34,6 +34,6 @@ public class ByKeyMediaTypeController : MediaTypeControllerBase
}
MediaTypeResponseModel model = _umbracoMapper.Map<MediaTypeResponseModel>(mediaType)!;
return await Task.FromResult(Ok(model));
return Ok(model);
}
}
@@ -1,14 +1,17 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Factories;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.MediaType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMediaTypes)]
public class ExportMediaTypeController : MediaTypeControllerBase
{
private readonly IMediaTypeService _mediaTypeService;
@@ -1,17 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.ViewModels.MediaType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.MediaType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMediaTypes)]
public class ImportExistingMediaTypeController : MediaTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
@@ -1,18 +1,19 @@
using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Api.Management.Controllers.DocumentType;
using Umbraco.Cms.Api.Management.ViewModels.MediaType;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services.ImportExport;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Web.Common.Authorization;
namespace Umbraco.Cms.Api.Management.Controllers.MediaType;
[ApiVersion("1.0")]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMediaTypes)]
public class ImportNewMediaTypeController : MediaTypeControllerBase
{
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;

Some files were not shown because too many files have changed in this diff Show More