* Persist and expose Umbraco system dates as UTC (#19705)
* Updated persistence DTOs defining default dates to use UTC.
* Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true).
* Removed use of SpecifyKind setting dates to local.
* Removed unnecessary Utc suffixes on properties.
* Persist current date time with UtcNow.
* Removed further necessary Utc suffixes and fixed failing unit tests.
* Added migration for SQL server to update database date default constraints.
* Added comment justifying not providing a migration for SQLite default date constraints.
* Ensure UTC for datetimes created from persistence DTOs.
* Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API.
* Fixed migration SQL syntax.
* Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates.
* Ensured UTC dates are retrieved for document versions.
* Ensured UTC is returned for backoffice display of last edited and published for variant content.
* Fixed SQLite syntax for default current datetime.
* Apply suggestions from code review
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Further updates from code review.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Migrate system dates from local server time to UTC (#19798)
* Add settings for the migration.
* Add migration and implement for SQL server.
* Implement for SQLite.
* Fixes from testing with SQL Server.
* Fixes from testing with SQLite.
* Code tidy.
* Cleaned up usings.
* Removed audit log date from conversion.
* Removed webhook log date from conversion.
* Updated update date initialization on saving dictionary items.
* Updated filter on log queries.
* Use timezone ID instead of system name to work cross-culture.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Create sign provider collection and call registered providers on rendering a page of tree item view models.
Re-work tree controller constructors to provide registered providers as a collection.
* Stub implementation of sign provider for documents with a scheduled publish pending.
* Complete implementation of tree sign for pending scheduled publish.
* Added integration test for new method on IContentService.
* Added unit test for HasScheduleSignProvider.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tidied usings and clarified method header comments.
* Adding a fixed prefix to all future signs, and removing the provider property
* Adding a sign for protected tree documents.
* Adding IsProtectedSignProviderTest.cs & correcting HasScheduleSignProviderTests.cs to no longer assert the provider
* Fixing minor things in accordance with CR
* Adding collection items compatibility
* Introduced IHasSigns interface to provide more re-use across trees and collections.
Fixed updates to base content controllers (no need to introduce a new type variable).
Removed passing entities for populating tree signs (we aren't using it, so simplifies things).
* Refactoring a bit to make existing code less duplicated and fixing some constructor obsoletion
* Introducing a has pending changes sign.
* Applying changes based on CR
* Introducing tests for HasPendingChangesSignProvider.cs and stopped the use of contentService
* Introducing tests for HasPendingChangesSignProvider.cs and slight logic change
* Introduced HasCollectionSignProvider.cs and tests.
* Introducing collection signs to Media Tree & Media Collection items
* Introducing Plain Items and tests. Refactoring tests as well
* Introduced alternative CanProvideSigns() implementation on IsProtectedSignProvider.cs
* Slight refactoring to reduce bloating.
* Adding [ActivatorUtilitiesConstructor] since it threw an error otherwise
* Minor cleanup.
* Updated OpenApi.json.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
* Fix moving properties between groups sometimes clearing their values
* Small adjustment
* Fix failing integration test
The mapping method was only setting the property group when it was not null, but for orphaned properties we want to specifically set it to null.
* Adjust 'Can_Move_Properties_To_Another_Container' integration test to check more scenarios and that values are kept
* Adjust to add isElement variable in test (as previously)
* Fixes issue where content created from blueprint would not persist file upload property values.
* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.
* Clarified comment.
* Removed unneeded usings.
* Fixed spelling.
* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
* Introduce new AuditEntryService
- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
- Using ids (for easier transition from the previous Write method)
- Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)
* Audit service rework
- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test
* Apply suggestions from code review
* Small improvement
* Update src/Umbraco.Core/Services/AuditService.cs
* Some minor adjustments following the merge
* Delete unnecessary file
* Small cleanup on the tests
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`
In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.
* Added integration tests to verify that new block ids are generated when creating content from a blueprint
* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself
* Update CreateContentFromBlueprint xml docs to mention both replacement methods
* Fix tests for rich text blocks
* Small re-organization
* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`
* Add default implementation to new CreateBlueprintFromContent method
* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Filter Available should not return items without published ancestors when not in preview
* Update unittests mocks
* Internal documentation and minor code tidy.
* Tidied up integration tests and added new tests for the added method.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Clear elementscache from cache refreshers
* Add very simple test ensuring the elements cache is cleared
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Updated dependencies to latest versions.
* Fixed breaking changes following dependency updates.
* Limited NUnit updates to within the current major.
* Fixed failing delivery API contract integration test.
* Added integration tests for publishing service with invalid content.
* Amend test to new create/update models
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* content type nesting
* TODOs
* repository detail manager
* todo
* implement unlimited compositions
* a little refactor
* warn
* clear state
* refactor to use unique
* note
* code corrections to match with types
* unique type for Array State
* implement usedForInheritance and editedTypes for Structure Manager and Compositions
* rename method
* Update repository-details.manager.ts
* avoid type casting
* align naming
* do not await
* fix race condition when switching document types fast
* remove test prop
* Update manifests.ts
* UmbMediaTypeWorkspaceContext Routes for inheritance
* import
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* 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>
* 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>
* 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.
* 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.
* 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.
* 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.
* 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>
* 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>
* 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>
* 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>
* 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>
* 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