Files
Umbraco-CMS/src/Umbraco.Core/Services/TrackedReferencesService.cs

111 lines
5.7 KiB
C#
Raw Normal View History

Item tracking improvements (#11919) * Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
Item tracking improvements (#11919) * Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
using Umbraco.Cms.Core.Persistence.Repositories;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services.OperationStatus;
Item tracking improvements (#11919) * Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
V10: Fix build warnings in core (#12438) * Run code cleanup * Start manual cleanup after dotnet format * Finish up manual pass * Fix up missed warnings * Fix after merge * Update src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DeepCloneAppCache.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DomainCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MacroCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MediaCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DataTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentUnpublishingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DomainCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/LanguageCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MacroCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptiedRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptyingRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/ShadowWrapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Logging/DisposableTimer.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StatefulNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/DeepCloneHelper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/File.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Fix based on review * Fix after merge Signed-off-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-07 15:28:38 +02:00
namespace Umbraco.Cms.Core.Services;
public class TrackedReferencesService : ITrackedReferencesService
Item tracking improvements (#11919) * Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
{
V10: Fix build warnings in core (#12438) * Run code cleanup * Start manual cleanup after dotnet format * Finish up manual pass * Fix up missed warnings * Fix after merge * Update src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DeepCloneAppCache.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DomainCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MacroCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MediaCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DataTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentUnpublishingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DomainCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/LanguageCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MacroCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptiedRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptyingRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/ShadowWrapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Logging/DisposableTimer.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StatefulNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/DeepCloneHelper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/File.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Fix based on review * Fix after merge Signed-off-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-07 15:28:38 +02:00
private readonly ICoreScopeProvider _scopeProvider;
private readonly IEntityService _entityService;
V10: Fix build warnings in core (#12438) * Run code cleanup * Start manual cleanup after dotnet format * Finish up manual pass * Fix up missed warnings * Fix after merge * Update src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DeepCloneAppCache.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/DomainCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MacroCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MediaCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DataTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/ContentUnpublishingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DictionaryItemSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/DomainCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/LanguageCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MacroCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptiedRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaEmptyingRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaMovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MediaTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberGroupSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeChangedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeRefreshedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MemberTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/StringExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Extensions/UriExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/PhysicalFileSystem.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/IO/ShadowWrapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Logging/DisposableTimer.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PartialViewSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeCacheRefresherNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavedNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/RelationTypeSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StatefulNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetDeletingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Notifications/StylesheetSavingNotification.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/DeepCloneHelper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/File.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Fix based on review * Fix after merge Signed-off-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-06-07 15:28:38 +02:00
private readonly ITrackedReferencesRepository _trackedReferencesRepository;
public TrackedReferencesService(
ITrackedReferencesRepository trackedReferencesRepository,
ICoreScopeProvider scopeProvider,
IEntityService entityService)
v11: Merge `v10/feature/project-cleanup` into `v11/dev` (#13112) * New backoffice/add system text json configuration attribute (#12998) * Add SystemTextJsonConfigurationAttribute * Fix up formatting * Rename classes for clearer purpose Co-authored-by: Zeegaan <nge@umbraco.dk> * UmbracoPath should no longer be configurable (#13032) * UmbracoPath should no longer be configurable * Remove UmbracoPath configuration from all tests * Only contain style instead of full layout (#13033) * Only contain style instead of full layout (#13033) * Fix CodeQL duplicate "permissions" node and reformat * add an extra check to ensure the pips exist before adding a class to them * improve pip classList add/remove with no intermediary variable * Only contain style instead of full layout (#13033) * Ensure consistent margin on headings in tree root (#12992) * Ensure consistent margin on headings in tree root (#12992) (cherry picked from commit 88bfef9e0de58fe4fbf4bbb409f3257acd864849) * Bump version to 10.2.1 * Translate "User permissions for languages" feature to dutch (#12971) * Translate 'sectionsHelp' to Dutch * Translate 'selectLanguages' to Dutch * Transkate 'allowAccessToAllLanguages' to Dutch * Translate "User permissions for languages" feature to español (#12975) * Translate 'selectLanguages' to Español * Translate 'languagesHelp' to español * Translate 'allowAccessToAllLanguages' to spanish * Updated project references for Forms and Deploy in the JsonSchema project. (#13047) * Updated project references for Forms and Deploy in the JsonSchema project. (#13047) * UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043) * add an extra check to ensure the pips exist before adding a class to them * improve pip classList add/remove with no intermediary variable * pass in parameters needed to member service (#13020) * Missing methods from IMemberService (#13022) * Add back methods to interface * Add default implementations to avoid breaking changes Co-authored-by: Zeegaan <nge@umbraco.dk> * New endpoint for web profiling dashboard (#13038) * Endpoint for web profiling dashboard * Add profiling API contract * New Backoffice: Published cache controller (#13034) * Add published cache controller (endpoints for the Published Status dashboard) * Update OpenAPI contract for published cache endpoints * Fix OpenApi spec Co-authored-by: Zeegaan <nge@umbraco.dk> * Bug fix for datepicker with offset time (#12847) * https://github.com/umbraco/Umbraco-CMS/issues/12844 * remove "X" from ng-attr Doing the test I killed the ng-if attr. But forgot it was there doing the commit Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk> * Make sure swagger tags and operations are sorted alphabetically (#13055) * Add spellcheck false to password inputs (#13059) * Add null check for variants in Grid Layout (#13060) This fixes a regression from 10.2.0 where the `variants` property was removed. * Add null check for variants in Grid Layout (#13060) This fixes a regression from 10.2.0 where the `variants` property was removed. * Fixes #12972 for validating legacy member passwords (#12973) * Fixes #12972 for validating legacy member passwords * Removed unused variable * removed unused variable * Fix issue toggling boolean between true/false after Save without refreshing * New backoffice: examine management controller (#12981) * Add ExamineManagementControllerBase * Add ExamineIndexModelFactory * Add IndexesExamineManagementController * Add proper attributes * Implement ExamineIndexViewModel.cs * formatting * Add comment about it working in .NET 7 * Add SearchersExamineManagementController.cs * Update comments about why it might throw errors * Add SearchResultViewModel * Add SearchExamineManagementController * Add ExamineSearcherValidationService * Rename ExamineSearcherValidationService.cs to ExamineSearcherFinderService.cs * Rename interface aswell * Add SearchExamineManagementController * Refactor ExamineSearcherFinderService * Add HasIndexRebuiltExamineManagementController.cs * Fix up formatting * Async actions * Add RebuildIndexExamineManagementController.cs * Rename IExamineIndexModelFactory to IExamineIndexViewModelFactory * Refactor HasIndexRebuilt endpoint to Index endpoint * Remove unused usings * Fix up DetailsExplanation * Create dedicated SearchersViewModel * Rename action * Rename RebuildIndex to Rebuild * Dont have changes in ExamineIndexModel * Make values strongly typed instead of generic lists of strings * Rename to non-plural * Rename to non-plural * Rename controller * Introduce ITemporaryIndexingService * Introduce ITemporaryIndexingService * Add SearcherName to view model * Move to new ExamineManagementControllerBase.cs * Refactor ExamineManagerService * Use init instead of setters * Make properties explicitly on models * Add DI * Apply suggestions from code review Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * Rename to IndexExamineManagementController * Return ViewModel instead of exception * Make view models non-nullable * Add examine management extension point * Rename to IndexingRebuilderService * Move rebuild logic to service * Fix up usages in IIndexingRebuilderService * Fix up DI * Fix OpenApi contract * Implement CanRebuild on IIndexingRebuilderService.cs Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * Update build script * Add BuildProjectReferences=false to dotnet pack * Internalize Umbraco.Cms.ManagementApi references * Make Searchers endpoint return ActionResult (#13068) * New backoffice - trees design (#12963) * Refactor: Add default versioned back office route attribute * Tree controller bases and first draft implementations for document, media and doctype * Move tree item view models to appropriate location * Fix missing parent * Refactor user entity access for testability * A bit of clean-up + handle user start nodes for items endpoint * Implement foldersOnly for folder tree * Items endpoint for document type tree * Strongly typed action results * Content + media recycle bin * Correct return type for swagger * Member type tree * Rename user start node handling to make a little more sense * Revert to faked admin start nodes in document tree * Media type tree * Data type tree * Relation type tree * Remove unused dependency from member type tree * Correct documentation for member type tree endpoint response types * Use icon constants * Add templates tree * Member group tree * Document blueprint tree * Partial views, scripts and stylesheets trees * Static files tree * Clarify "folders only" state * Comments and improved readability * Rename TreeControllerBase and TreeItemViewModel * Move recycle bin controller base to its own namespace * Moved tree base controllers to their own namespace * Common base class for tree view models * Remove ProblemDetails response type declaration from all actions * Add OpenApiTag * Various review comments * Dictionary item tree * Renamed all tree controllers to follow action/feature naming convention * Handle client culture state for document tree * Support "ignore user start nodes" for content and media + refactor how tree states work to make things more explicit * Fix or postpone a few TODOs * Make entity service able to paginate trashed children * Handle sorting explicitly * Re-apply VersionedApiBackOfficeRoute to install and upgrade controllers after merge * Use PagedViewModel instead of PagedResult for all trees * Explain the usage of UmbracoObjectTypes.Unknown * Introduce and apply GetMany pattern for dictionary items * Add a note about relation type caching * Fix broken test build + add unit tests for new localization service methods * Use new management API controller base * Entity repository should build document entities for document blueprints when getting paged entities (same as it does when getting specific entities) * Use Media type for Media recycle bin Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Move shared relation service to concrete implementations * Use inclusive language * Add 401 response type documentation to applicable trees * Refactor entity load for folder tree controller base + ensure that folders are only included in the first result page * Add (in-memory) pagination to dictionary tree * Make file system controller honor paging parameters * Support pagination in relation type tree * Clarify method name a bit for detecting tree root path requests * Update Open API schema to match new trees * Move from page number and page size to skip/take (with temporary workaround for lack of property skip/take pagination in current DB implementation) * Update OpenAPI schema to match skip/take * Update OpenAPI schema * Don't return paginated view models from "items" endpoints * Update OpenApi schema Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Use pattern matching to check if items is not `JArray` * Bump Smidge up to v4.1.1 * Removing X-XSS-Protection healthcheck * Redirect to a return URL if one is present on the querystring when logging into the back office * Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions') * Implement playwright acceptance tests instead of cypress (#13069) * fix up dependencies in package.json * Change configs to playwright * update types * remove cypress * add playwright * Fix up imports * Move up test files * Fix up scripts * Update user import * Remove allowEditInvariantFromNonDefault=True.spec.ts * Update docker container * Run playwright on pipelines * Install playwright * change urls * change to run playwright * Update reporter * create .env file when installing * update pipelines * Remove @in yml * Update Yaml script to use New-Item * Pipe object to Value * Update yaml to use "" not {} * Update localhost to proper port * Push package-lock.json * include dotenv in package.json * Add back umbraco.config.ts * Dont change launchSettings.json * Fix up pipelines * Change working directory * Add logging * Actually name the file * Remove .env from path * Add working directory * Add working directory to script * check env content * Update more working dir * Try making newline in YAML * add quotes * Try multiline infront of script * Move top statement * use https * Update to localhost 44331 * ignore https in config * Change linux to https * add timeouts for tests * Fix up url for linux * Update docker to use port 44331 -> 5000 * increase timeout * Update yaml * Remove Cypress references and fix URL/port mapping * Update umbraco-linux.docker * Generate ASP.NET HTTPS development certificate * Enable HTTPS development certificate in Docker * Dont run failing tests * Update HTTPS development certificate generation * Copy nuget.config to correct location in Docker file * do not run flaky test * update outputdir * Remove flaky tests * Update to dot reporter * Update to json-models-builders package * Check if results folder exists * Remove logging * Use bash to find folder * Dont use junit to report * only publish if folder exists * Add 5 retries for CI * search correct folder * Remove unused json file * Use line reporter * Remove umbraco.config.ts * Remove more flaky test * Add waits so we dont bombard SQLite * Add page as parameter * add page as parameter * Remove flaky macro test Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Ronald Barendse <ronald@barend.se> * Fix comment of view property in `ConfigurationFieldAttribute` (#13077) * Fix comment of view property in `ConfigurationFieldAttribute` * Update description of key property as well * Use char instead of string for DetectJson (#13019) * Use char instead of string for DetectJson * Use faster method * Change DetectIsJon method * Update acceptance test readme & scripts (#13078) * Update readme to reflect the change to playwright * Update test scripts * update README * update pipelines to run new script * update package.json scripts * dont include demo test in package.json * Add creation of blueprint test * Implement create test script Co-authored-by: Zeegaan <nge@umbraco.dk> * Refactor event handler away from keyup to ng-change * Don't use legacy icon for action delete * Added nullability attribute to IsNullOrWhitespace * Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61 * Revert "Removing X-XSS-Protection healthcheck" (#13096) This reverts commit 696475ebf25f28dca2c21c511caf5bfb1a36a44f. Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: New Api controllers (#12983) * Create migrate Language controller to Umbraco.Cms:ManagementApi * Add proper language mapping * Update mapping to handle if language name is null * Uncomment code * Add new language view model * Add LanguageViewModelMapping * Add mapper registration * Fix up AddMappers extension method * Implement mapping IEnumerable of languages * Change action signatures to ViewModel instead of model * Seperate logic from controller into service * Move LanguageService.cs * Register service * Fix up mapping * Add null check to mapping instead of controller * Map to ILanguage instead of implementation * Fix up null check * Implement ProblemDetailsBuilder.cs * Rename duplicate method * Use builder in actions * Implement new Paged models * Create language controller base * Use pagedModel for GetAllLanguages * Create GetAllLanguagesPaged method * Split language controller into single APIs * Fix up controllers with API versions * Map Total property * Fix up route and naming for GetLanguageController.cs * Fix up naming for language controllers * New folder structure * Add culture controllers * Map CultureInfos to paged CultureViewModel * Remove wierd include in csproj * Refactor controller to return pagedViewModel instead of dictionary * Fix up mapping to map single and enumerable * Register mapping * Add apiversion to controller * Add inheritdoc * Create DictionaryControllerBase.cs * Add delete controller * Only use HttpDelete for deletes * Check also if language exists in service * Split Save action into Create & Update actions * Update Http attributes on Create and update controllers * Proper routing for delete controller * Add api version * Make action async * Implement CreateDictionaryController * Create DictionaryViewModel.cs * Use viewmodel instead of values * Create get by int DictionaryController * Add view models * Rename controller * Rename DictionaryViewModel to DictionaryItemViewModel * use created instead of ID * Apply DataContract/Datamember to view model * change to guid instead of Guid * Use proper responses instead of return models when creating/updating * Implement new IDictionaryService * Implement new MoveController * Use new service in mapper * Remove unused method * Add DictionaryViewModelMapDefinition * Create MoveOrCopyViewModel * Proper Http action * Create UpdateDictionary controller * Map IDictionaryItem to DictionaryViewModel * Add JsonPatching * Add UpdateDictionaryController.cs * Map DictionaryTranslationsDisplays properly * ParentId should be nullable * Add new DictionaryTranslationViewModel.cs * Remove translationViewModel * Add Id and Key to DictionaryTranslationDisplay.cs * Implement IDictionaryFactory.cs * Create DictionaryViewModels and do not use IEntity * Map to new view models instead of displays * Register the factiories in the service container * Remove newtonsoft * Add serializing to and from PatchDocs * Use JsonPatchViewModel instead of object type * Add JsonPatch.Net to csproj * Implement JsonPatchService.cs * Register JsonPatchService * Make model non-nullable * Update controllers to use new attributes * Rename MoveViewModel.cs * Remove NameIsDirty as that is legacy from how we used to handle updating * Add GetAllDictionaryController * Add todo to DictionaryControllerBase * Add ExportDictionaryController * Add ImportDictionaryController * Remove unused umbraco mapper * Add upload dictionary controller * Create Dictionary import view models * Update UploadDictionaryController with view models * Remove unused using * Implement pagedviewmodel for GetAllDictionaryController.cs * Add dictionary overview viewmodels * Add mapping for DictionaryOverViewModel * Update Dictionary controller to use new viewmodel * Fix up attributes for UploadDictionaryController * Make actions async * Make controller bases abstract * Fix after merge * New backoffice: Analytics controller (#12957) * Add AnalyticsControllerBase * Add AnalyticsViewModel * Add GetAnalyticsController * Update ViewModel to use System.Text.Json * Add SetAnalyticsController * Add AnalyticsLevelViewModel * Add GetAllAnalyticsController * Add viewmodel factory * Register factory for DI * Use factory for creation of ViewModel * Fix up AnalyticsLevelViewModel.cs * Use analyticsLevelViewModel * Add Enum validation to controller * Add OpenApi attributes * Add routing to GetAllAnalyticsController * Rename IPagedViewModelFactory * use new renamed PagedViewModelFactory * Make actions async * Make controller base abstract * Fix up after merge Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Help controller (#12958) * Add HelpControllerBase * Add HelpPageViewModel * Add GetHelpController * Add viewmodel factory * Register factory for DI * Use PagedViewModelFactory for controller * Update baseurl to be nullable * Rename IPagedViewModelFactory * Use new renamed IPagedViewModelFactory * Dont use httpclient as field Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Relation controller (#12961) * Add relation controller base * Add commen about auth * Add GetRelationController * Use mapping to viewmodel * Add RelationViewModel * Add RelationViewModelsMapDefinition.cs * Add viewmodel factory * Register factory for DI * Rename IPagedViewModelFactory * Add RelationViewModelFactory * Remove unused service * Add GetByChildRelationController * Add relationViewModelFactory to DI * Add MappingBuilderExtensions * Add relationViewModelsMapDefinition to DI * Use PagedViewModel for child relations * Add CreateMultiple * Update GetRelationController to use factory instead of direct mapping * Update GetByChildRelationController to use relationViewModelFactory * Fix up after merge Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Tracked references controller (#12966) * Add TrackedReferencesControllerBase.cs * Add GetTrackedReferencesController * Add relation model * Add ITrackedReferencesRepository.cs * Rename relation to RelationModel * Add RelationMapDefinition.cs * Add TrackedReferencesSkipTakeRepository * Rename RelationModelMapDefinition * Add new services to DI * Rename RelationModel to RelationItemModel * Implement TrackedReferencesSkipTakeService * Formatting * Add RelationItemViewModel.cs * Add mapdefition * Update TrackedReferencesController to use new PagedViewModel * Add service to DI * imlement proper routing * Add async to GetTrackedReferencesController.cs * Rename action to get * Add DescendantTrackedReferencesController * make filterMustBeIsDependency nullable * Use count instead of capacity * Rename controller * Add MultipleTrackedReferencesController.cs * Refactor TrackedReferencesService to not return pagedViewModel * Remove TODO untill consensus on convention * Formatting * Delete old duplicate controller * Fix up naming * Fix up naming and fixed todo * Fix up mapdefinition registrations * Rename controllers * Fix naming * Fix nullable tree * Fix up relation controller & action names * Fix naming * Fix up multiple to not be post * Apply suggestions from code review Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Remove [ApiVersion] from each individual controller and added to base instead * Added missing semi-colon * Update all "non-async async" endpoints to return Task.FromResult * Fixed up LanguageViewModels namespace * Return proper status code * Update xml documentation * Rename GetAllCultureController * Change return type attribute to proper Model * Change return type attribute to correct model * Add clarifying comment * Change return type attribute to proper model * Rename ById to by key * Update DictionaryOverviewViewModel to use Key instead of ID * Implement factory method to create viewModel instead of using services in mapper * Fix up DictionaryItemViewModel to use Parent GUID instead of ID * Update return type attribute to correct model * Update key to actual GUID instead of string * Update route to not include "delete" * Remove redundant IActionResult specification * Update responseType attribute to correct models * Update OpenApiTag for DictionaryControllerBase * Update ResponseType attribute to correct models * update variable name to not be "XD" * Update ResponseType attribute to correct model * Update route to not include "update" as it is redundant * Update produces responsetype attributes to correct models * Use IJsonSerializer abstraction instead of JsonConvert directly * Remove unused field * Change ResponseType attribute to correct model * change TrackedReferencesSkipTakeService to return pagedModels directly * Remove duplicate DI * change to better variable names * Move RelationItemModel to core * Remove empty folder * Remove ITrackedReferencesSkipTakeService and add it to TrackedReferencesService * remove TrackedReferencesSkipTakeRepository and add to TrackedReferencesRepository.cs * Fix up TrackedReferencesService to not use SkipTake repository * Remove AddRepositories from ManagementApiComposer * Transition to ManagementApiBaseController * Fixes ResponseType attribute to correct model * Add loading files to service instead of having logic in controller * Add todo comment * Fix up routing for delete language * Use problem details builder * Add SystemTextJsonSerializer * Add SystemTextJsonSerializer * Remove unused usings * Remove obsolete MoveDictionaryController * Remove CreateDate and UpdateDate from DictionaryViewModel * Change response type to correct model * Remove PagedViewModelFactory.cs * Add obsolete message * Fix installer view models A setter is required for the modelbinder to be able to do its work * Update src/Umbraco.Cms.ManagementApi/Controllers/Analytics/SetAnalyticsController.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update ResponseType to correct Model * Update comment * Add FileUploadService * Add DictionaryFactory.cs to handle creation of viewmodel * Remove unused DI * Rename actions & controllers to reflect eachother * Update OpenApi.json * Add dictionary to openapi * Update in proper alphabetical order * Add trackedReferences to openapi * Fix open api doc Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Co-authored-by: Zeegaan <nge@umbraco.dk> * Backport project cleanup from #12907 * Remove empty Directory.Build.props * Fix GenerateAppsettingsSchema target * Re-add empty Directory.Build.props to prevent inheritance * Re-add missing JsonPatch.Net dependency * Fix merge issues (redundant TargetFramework property and appsettings-schema.json generation) * Fix and improve OpenAPI test assertion Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> Co-authored-by: Mads Rasmussen <madsr@hey.com> Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com> Co-authored-by: Erik-Jan Westendorp <erikjanwestendorp@outlook.com> Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com> Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk> Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Busra Sengul <aysebusrasengul@gmail.com> Co-authored-by: Justin Neville <justin@nevitech.co.uk> Co-authored-by: Jeavon Leopold <jeavon@crumpled-dog.com> Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com> Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com> Co-authored-by: bakersbakebread <hello@seanthorne.co.uk> Co-authored-by: Karl Butler <kbutler@carbonsix.digital>
2022-10-05 12:14:43 +02:00
{
_trackedReferencesRepository = trackedReferencesRepository;
_scopeProvider = scopeProvider;
_entityService = entityService;
v11: Merge `v10/feature/project-cleanup` into `v11/dev` (#13112) * New backoffice/add system text json configuration attribute (#12998) * Add SystemTextJsonConfigurationAttribute * Fix up formatting * Rename classes for clearer purpose Co-authored-by: Zeegaan <nge@umbraco.dk> * UmbracoPath should no longer be configurable (#13032) * UmbracoPath should no longer be configurable * Remove UmbracoPath configuration from all tests * Only contain style instead of full layout (#13033) * Only contain style instead of full layout (#13033) * Fix CodeQL duplicate "permissions" node and reformat * add an extra check to ensure the pips exist before adding a class to them * improve pip classList add/remove with no intermediary variable * Only contain style instead of full layout (#13033) * Ensure consistent margin on headings in tree root (#12992) * Ensure consistent margin on headings in tree root (#12992) (cherry picked from commit 88bfef9e0de58fe4fbf4bbb409f3257acd864849) * Bump version to 10.2.1 * Translate "User permissions for languages" feature to dutch (#12971) * Translate 'sectionsHelp' to Dutch * Translate 'selectLanguages' to Dutch * Transkate 'allowAccessToAllLanguages' to Dutch * Translate "User permissions for languages" feature to español (#12975) * Translate 'selectLanguages' to Español * Translate 'languagesHelp' to español * Translate 'allowAccessToAllLanguages' to spanish * Updated project references for Forms and Deploy in the JsonSchema project. (#13047) * Updated project references for Forms and Deploy in the JsonSchema project. (#13047) * UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043) * add an extra check to ensure the pips exist before adding a class to them * improve pip classList add/remove with no intermediary variable * pass in parameters needed to member service (#13020) * Missing methods from IMemberService (#13022) * Add back methods to interface * Add default implementations to avoid breaking changes Co-authored-by: Zeegaan <nge@umbraco.dk> * New endpoint for web profiling dashboard (#13038) * Endpoint for web profiling dashboard * Add profiling API contract * New Backoffice: Published cache controller (#13034) * Add published cache controller (endpoints for the Published Status dashboard) * Update OpenAPI contract for published cache endpoints * Fix OpenApi spec Co-authored-by: Zeegaan <nge@umbraco.dk> * Bug fix for datepicker with offset time (#12847) * https://github.com/umbraco/Umbraco-CMS/issues/12844 * remove "X" from ng-attr Doing the test I killed the ng-if attr. But forgot it was there doing the commit Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk> * Make sure swagger tags and operations are sorted alphabetically (#13055) * Add spellcheck false to password inputs (#13059) * Add null check for variants in Grid Layout (#13060) This fixes a regression from 10.2.0 where the `variants` property was removed. * Add null check for variants in Grid Layout (#13060) This fixes a regression from 10.2.0 where the `variants` property was removed. * Fixes #12972 for validating legacy member passwords (#12973) * Fixes #12972 for validating legacy member passwords * Removed unused variable * removed unused variable * Fix issue toggling boolean between true/false after Save without refreshing * New backoffice: examine management controller (#12981) * Add ExamineManagementControllerBase * Add ExamineIndexModelFactory * Add IndexesExamineManagementController * Add proper attributes * Implement ExamineIndexViewModel.cs * formatting * Add comment about it working in .NET 7 * Add SearchersExamineManagementController.cs * Update comments about why it might throw errors * Add SearchResultViewModel * Add SearchExamineManagementController * Add ExamineSearcherValidationService * Rename ExamineSearcherValidationService.cs to ExamineSearcherFinderService.cs * Rename interface aswell * Add SearchExamineManagementController * Refactor ExamineSearcherFinderService * Add HasIndexRebuiltExamineManagementController.cs * Fix up formatting * Async actions * Add RebuildIndexExamineManagementController.cs * Rename IExamineIndexModelFactory to IExamineIndexViewModelFactory * Refactor HasIndexRebuilt endpoint to Index endpoint * Remove unused usings * Fix up DetailsExplanation * Create dedicated SearchersViewModel * Rename action * Rename RebuildIndex to Rebuild * Dont have changes in ExamineIndexModel * Make values strongly typed instead of generic lists of strings * Rename to non-plural * Rename to non-plural * Rename controller * Introduce ITemporaryIndexingService * Introduce ITemporaryIndexingService * Add SearcherName to view model * Move to new ExamineManagementControllerBase.cs * Refactor ExamineManagerService * Use init instead of setters * Make properties explicitly on models * Add DI * Apply suggestions from code review Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * Rename to IndexExamineManagementController * Return ViewModel instead of exception * Make view models non-nullable * Add examine management extension point * Rename to IndexingRebuilderService * Move rebuild logic to service * Fix up usages in IIndexingRebuilderService * Fix up DI * Fix OpenApi contract * Implement CanRebuild on IIndexingRebuilderService.cs Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * Update build script * Add BuildProjectReferences=false to dotnet pack * Internalize Umbraco.Cms.ManagementApi references * Make Searchers endpoint return ActionResult (#13068) * New backoffice - trees design (#12963) * Refactor: Add default versioned back office route attribute * Tree controller bases and first draft implementations for document, media and doctype * Move tree item view models to appropriate location * Fix missing parent * Refactor user entity access for testability * A bit of clean-up + handle user start nodes for items endpoint * Implement foldersOnly for folder tree * Items endpoint for document type tree * Strongly typed action results * Content + media recycle bin * Correct return type for swagger * Member type tree * Rename user start node handling to make a little more sense * Revert to faked admin start nodes in document tree * Media type tree * Data type tree * Relation type tree * Remove unused dependency from member type tree * Correct documentation for member type tree endpoint response types * Use icon constants * Add templates tree * Member group tree * Document blueprint tree * Partial views, scripts and stylesheets trees * Static files tree * Clarify "folders only" state * Comments and improved readability * Rename TreeControllerBase and TreeItemViewModel * Move recycle bin controller base to its own namespace * Moved tree base controllers to their own namespace * Common base class for tree view models * Remove ProblemDetails response type declaration from all actions * Add OpenApiTag * Various review comments * Dictionary item tree * Renamed all tree controllers to follow action/feature naming convention * Handle client culture state for document tree * Support "ignore user start nodes" for content and media + refactor how tree states work to make things more explicit * Fix or postpone a few TODOs * Make entity service able to paginate trashed children * Handle sorting explicitly * Re-apply VersionedApiBackOfficeRoute to install and upgrade controllers after merge * Use PagedViewModel instead of PagedResult for all trees * Explain the usage of UmbracoObjectTypes.Unknown * Introduce and apply GetMany pattern for dictionary items * Add a note about relation type caching * Fix broken test build + add unit tests for new localization service methods * Use new management API controller base * Entity repository should build document entities for document blueprints when getting paged entities (same as it does when getting specific entities) * Use Media type for Media recycle bin Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Move shared relation service to concrete implementations * Use inclusive language * Add 401 response type documentation to applicable trees * Refactor entity load for folder tree controller base + ensure that folders are only included in the first result page * Add (in-memory) pagination to dictionary tree * Make file system controller honor paging parameters * Support pagination in relation type tree * Clarify method name a bit for detecting tree root path requests * Update Open API schema to match new trees * Move from page number and page size to skip/take (with temporary workaround for lack of property skip/take pagination in current DB implementation) * Update OpenAPI schema to match skip/take * Update OpenAPI schema * Don't return paginated view models from "items" endpoints * Update OpenApi schema Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Use pattern matching to check if items is not `JArray` * Bump Smidge up to v4.1.1 * Removing X-XSS-Protection healthcheck * Redirect to a return URL if one is present on the querystring when logging into the back office * Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions') * Implement playwright acceptance tests instead of cypress (#13069) * fix up dependencies in package.json * Change configs to playwright * update types * remove cypress * add playwright * Fix up imports * Move up test files * Fix up scripts * Update user import * Remove allowEditInvariantFromNonDefault=True.spec.ts * Update docker container * Run playwright on pipelines * Install playwright * change urls * change to run playwright * Update reporter * create .env file when installing * update pipelines * Remove @in yml * Update Yaml script to use New-Item * Pipe object to Value * Update yaml to use "" not {} * Update localhost to proper port * Push package-lock.json * include dotenv in package.json * Add back umbraco.config.ts * Dont change launchSettings.json * Fix up pipelines * Change working directory * Add logging * Actually name the file * Remove .env from path * Add working directory * Add working directory to script * check env content * Update more working dir * Try making newline in YAML * add quotes * Try multiline infront of script * Move top statement * use https * Update to localhost 44331 * ignore https in config * Change linux to https * add timeouts for tests * Fix up url for linux * Update docker to use port 44331 -> 5000 * increase timeout * Update yaml * Remove Cypress references and fix URL/port mapping * Update umbraco-linux.docker * Generate ASP.NET HTTPS development certificate * Enable HTTPS development certificate in Docker * Dont run failing tests * Update HTTPS development certificate generation * Copy nuget.config to correct location in Docker file * do not run flaky test * update outputdir * Remove flaky tests * Update to dot reporter * Update to json-models-builders package * Check if results folder exists * Remove logging * Use bash to find folder * Dont use junit to report * only publish if folder exists * Add 5 retries for CI * search correct folder * Remove unused json file * Use line reporter * Remove umbraco.config.ts * Remove more flaky test * Add waits so we dont bombard SQLite * Add page as parameter * add page as parameter * Remove flaky macro test Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Ronald Barendse <ronald@barend.se> * Fix comment of view property in `ConfigurationFieldAttribute` (#13077) * Fix comment of view property in `ConfigurationFieldAttribute` * Update description of key property as well * Use char instead of string for DetectJson (#13019) * Use char instead of string for DetectJson * Use faster method * Change DetectIsJon method * Update acceptance test readme & scripts (#13078) * Update readme to reflect the change to playwright * Update test scripts * update README * update pipelines to run new script * update package.json scripts * dont include demo test in package.json * Add creation of blueprint test * Implement create test script Co-authored-by: Zeegaan <nge@umbraco.dk> * Refactor event handler away from keyup to ng-change * Don't use legacy icon for action delete * Added nullability attribute to IsNullOrWhitespace * Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61 * Revert "Removing X-XSS-Protection healthcheck" (#13096) This reverts commit 696475ebf25f28dca2c21c511caf5bfb1a36a44f. Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: New Api controllers (#12983) * Create migrate Language controller to Umbraco.Cms:ManagementApi * Add proper language mapping * Update mapping to handle if language name is null * Uncomment code * Add new language view model * Add LanguageViewModelMapping * Add mapper registration * Fix up AddMappers extension method * Implement mapping IEnumerable of languages * Change action signatures to ViewModel instead of model * Seperate logic from controller into service * Move LanguageService.cs * Register service * Fix up mapping * Add null check to mapping instead of controller * Map to ILanguage instead of implementation * Fix up null check * Implement ProblemDetailsBuilder.cs * Rename duplicate method * Use builder in actions * Implement new Paged models * Create language controller base * Use pagedModel for GetAllLanguages * Create GetAllLanguagesPaged method * Split language controller into single APIs * Fix up controllers with API versions * Map Total property * Fix up route and naming for GetLanguageController.cs * Fix up naming for language controllers * New folder structure * Add culture controllers * Map CultureInfos to paged CultureViewModel * Remove wierd include in csproj * Refactor controller to return pagedViewModel instead of dictionary * Fix up mapping to map single and enumerable * Register mapping * Add apiversion to controller * Add inheritdoc * Create DictionaryControllerBase.cs * Add delete controller * Only use HttpDelete for deletes * Check also if language exists in service * Split Save action into Create & Update actions * Update Http attributes on Create and update controllers * Proper routing for delete controller * Add api version * Make action async * Implement CreateDictionaryController * Create DictionaryViewModel.cs * Use viewmodel instead of values * Create get by int DictionaryController * Add view models * Rename controller * Rename DictionaryViewModel to DictionaryItemViewModel * use created instead of ID * Apply DataContract/Datamember to view model * change to guid instead of Guid * Use proper responses instead of return models when creating/updating * Implement new IDictionaryService * Implement new MoveController * Use new service in mapper * Remove unused method * Add DictionaryViewModelMapDefinition * Create MoveOrCopyViewModel * Proper Http action * Create UpdateDictionary controller * Map IDictionaryItem to DictionaryViewModel * Add JsonPatching * Add UpdateDictionaryController.cs * Map DictionaryTranslationsDisplays properly * ParentId should be nullable * Add new DictionaryTranslationViewModel.cs * Remove translationViewModel * Add Id and Key to DictionaryTranslationDisplay.cs * Implement IDictionaryFactory.cs * Create DictionaryViewModels and do not use IEntity * Map to new view models instead of displays * Register the factiories in the service container * Remove newtonsoft * Add serializing to and from PatchDocs * Use JsonPatchViewModel instead of object type * Add JsonPatch.Net to csproj * Implement JsonPatchService.cs * Register JsonPatchService * Make model non-nullable * Update controllers to use new attributes * Rename MoveViewModel.cs * Remove NameIsDirty as that is legacy from how we used to handle updating * Add GetAllDictionaryController * Add todo to DictionaryControllerBase * Add ExportDictionaryController * Add ImportDictionaryController * Remove unused umbraco mapper * Add upload dictionary controller * Create Dictionary import view models * Update UploadDictionaryController with view models * Remove unused using * Implement pagedviewmodel for GetAllDictionaryController.cs * Add dictionary overview viewmodels * Add mapping for DictionaryOverViewModel * Update Dictionary controller to use new viewmodel * Fix up attributes for UploadDictionaryController * Make actions async * Make controller bases abstract * Fix after merge * New backoffice: Analytics controller (#12957) * Add AnalyticsControllerBase * Add AnalyticsViewModel * Add GetAnalyticsController * Update ViewModel to use System.Text.Json * Add SetAnalyticsController * Add AnalyticsLevelViewModel * Add GetAllAnalyticsController * Add viewmodel factory * Register factory for DI * Use factory for creation of ViewModel * Fix up AnalyticsLevelViewModel.cs * Use analyticsLevelViewModel * Add Enum validation to controller * Add OpenApi attributes * Add routing to GetAllAnalyticsController * Rename IPagedViewModelFactory * use new renamed PagedViewModelFactory * Make actions async * Make controller base abstract * Fix up after merge Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Help controller (#12958) * Add HelpControllerBase * Add HelpPageViewModel * Add GetHelpController * Add viewmodel factory * Register factory for DI * Use PagedViewModelFactory for controller * Update baseurl to be nullable * Rename IPagedViewModelFactory * Use new renamed IPagedViewModelFactory * Dont use httpclient as field Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Relation controller (#12961) * Add relation controller base * Add commen about auth * Add GetRelationController * Use mapping to viewmodel * Add RelationViewModel * Add RelationViewModelsMapDefinition.cs * Add viewmodel factory * Register factory for DI * Rename IPagedViewModelFactory * Add RelationViewModelFactory * Remove unused service * Add GetByChildRelationController * Add relationViewModelFactory to DI * Add MappingBuilderExtensions * Add relationViewModelsMapDefinition to DI * Use PagedViewModel for child relations * Add CreateMultiple * Update GetRelationController to use factory instead of direct mapping * Update GetByChildRelationController to use relationViewModelFactory * Fix up after merge Co-authored-by: Zeegaan <nge@umbraco.dk> * New backoffice: Tracked references controller (#12966) * Add TrackedReferencesControllerBase.cs * Add GetTrackedReferencesController * Add relation model * Add ITrackedReferencesRepository.cs * Rename relation to RelationModel * Add RelationMapDefinition.cs * Add TrackedReferencesSkipTakeRepository * Rename RelationModelMapDefinition * Add new services to DI * Rename RelationModel to RelationItemModel * Implement TrackedReferencesSkipTakeService * Formatting * Add RelationItemViewModel.cs * Add mapdefition * Update TrackedReferencesController to use new PagedViewModel * Add service to DI * imlement proper routing * Add async to GetTrackedReferencesController.cs * Rename action to get * Add DescendantTrackedReferencesController * make filterMustBeIsDependency nullable * Use count instead of capacity * Rename controller * Add MultipleTrackedReferencesController.cs * Refactor TrackedReferencesService to not return pagedViewModel * Remove TODO untill consensus on convention * Formatting * Delete old duplicate controller * Fix up naming * Fix up naming and fixed todo * Fix up mapdefinition registrations * Rename controllers * Fix naming * Fix nullable tree * Fix up relation controller & action names * Fix naming * Fix up multiple to not be post * Apply suggestions from code review Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Remove [ApiVersion] from each individual controller and added to base instead * Added missing semi-colon * Update all "non-async async" endpoints to return Task.FromResult * Fixed up LanguageViewModels namespace * Return proper status code * Update xml documentation * Rename GetAllCultureController * Change return type attribute to proper Model * Change return type attribute to correct model * Add clarifying comment * Change return type attribute to proper model * Rename ById to by key * Update DictionaryOverviewViewModel to use Key instead of ID * Implement factory method to create viewModel instead of using services in mapper * Fix up DictionaryItemViewModel to use Parent GUID instead of ID * Update return type attribute to correct model * Update key to actual GUID instead of string * Update route to not include "delete" * Remove redundant IActionResult specification * Update responseType attribute to correct models * Update OpenApiTag for DictionaryControllerBase * Update ResponseType attribute to correct models * update variable name to not be "XD" * Update ResponseType attribute to correct model * Update route to not include "update" as it is redundant * Update produces responsetype attributes to correct models * Use IJsonSerializer abstraction instead of JsonConvert directly * Remove unused field * Change ResponseType attribute to correct model * change TrackedReferencesSkipTakeService to return pagedModels directly * Remove duplicate DI * change to better variable names * Move RelationItemModel to core * Remove empty folder * Remove ITrackedReferencesSkipTakeService and add it to TrackedReferencesService * remove TrackedReferencesSkipTakeRepository and add to TrackedReferencesRepository.cs * Fix up TrackedReferencesService to not use SkipTake repository * Remove AddRepositories from ManagementApiComposer * Transition to ManagementApiBaseController * Fixes ResponseType attribute to correct model * Add loading files to service instead of having logic in controller * Add todo comment * Fix up routing for delete language * Use problem details builder * Add SystemTextJsonSerializer * Add SystemTextJsonSerializer * Remove unused usings * Remove obsolete MoveDictionaryController * Remove CreateDate and UpdateDate from DictionaryViewModel * Change response type to correct model * Remove PagedViewModelFactory.cs * Add obsolete message * Fix installer view models A setter is required for the modelbinder to be able to do its work * Update src/Umbraco.Cms.ManagementApi/Controllers/Analytics/SetAnalyticsController.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update ResponseType to correct Model * Update comment * Add FileUploadService * Add DictionaryFactory.cs to handle creation of viewmodel * Remove unused DI * Rename actions & controllers to reflect eachother * Update OpenApi.json * Add dictionary to openapi * Update in proper alphabetical order * Add trackedReferences to openapi * Fix open api doc Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Co-authored-by: Zeegaan <nge@umbraco.dk> * Backport project cleanup from #12907 * Remove empty Directory.Build.props * Fix GenerateAppsettingsSchema target * Re-add empty Directory.Build.props to prevent inheritance * Re-add missing JsonPatch.Net dependency * Fix merge issues (redundant TargetFramework property and appsettings-schema.json generation) * Fix and improve OpenAPI test assertion Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> Co-authored-by: Mads Rasmussen <madsr@hey.com> Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com> Co-authored-by: Erik-Jan Westendorp <erikjanwestendorp@outlook.com> Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com> Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk> Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Busra Sengul <aysebusrasengul@gmail.com> Co-authored-by: Justin Neville <justin@nevitech.co.uk> Co-authored-by: Jeavon Leopold <jeavon@crumpled-dog.com> Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com> Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com> Co-authored-by: bakersbakebread <hello@seanthorne.co.uk> Co-authored-by: Karl Butler <kbutler@carbonsix.digital>
2022-10-05 12:14:43 +02:00
}
[Obsolete("Use the GetPagedRelationsForItemAsync overload which returns an Attempt with operation status. Scheduled for removal in Umbraco 19.")]
public Task<PagedModel<RelationItemModel>> GetPagedRelationsForItemAsync(Guid key, long skip, long take, bool filterMustBeIsDependency)
{
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
IEnumerable<RelationItemModel> items = _trackedReferencesRepository.GetPagedRelationsForItem(key, skip, take, filterMustBeIsDependency, out var totalItems);
var pagedModel = new PagedModel<RelationItemModel>(totalItems, items);
return Task.FromResult(pagedModel);
}
public async Task<Attempt<PagedModel<RelationItemModel>, GetReferencesOperationStatus>> GetPagedRelationsForItemAsync(Guid key, UmbracoObjectTypes objectType, long skip, long take, bool filterMustBeIsDependency)
{
IEntitySlim? entity = _entityService.Get(key, objectType);
if (entity is null)
{
return Attempt.FailWithStatus(GetReferencesOperationStatus.ContentNotFound, new PagedModel<RelationItemModel>());
}
#pragma warning disable CS0618 // Type or member is obsolete (but using whilst it exists to avoid code repetition)
PagedModel<RelationItemModel> pagedModel = await GetPagedRelationsForItemAsync(key, skip, take, filterMustBeIsDependency);
#pragma warning restore CS0618 // Type or member is obsolete
return Attempt.SucceedWithStatus(GetReferencesOperationStatus.Success, pagedModel);
}
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:05:59 +02:00
public Task<PagedModel<RelationItemModel>> GetPagedRelationsForRecycleBinAsync(UmbracoObjectTypes objectType, long skip, long take, bool filterMustBeIsDependency)
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
{
Guid objectTypeKey = objectType switch
{
UmbracoObjectTypes.Document => Constants.ObjectTypes.Document,
UmbracoObjectTypes.Media => Constants.ObjectTypes.Media,
_ => throw new ArgumentOutOfRangeException(nameof(objectType), "Only documents and media have recycle bin support."),
};
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
IEnumerable<RelationItemModel> items = _trackedReferencesRepository.GetPagedRelationsForRecycleBin(objectTypeKey, skip, take, filterMustBeIsDependency, out var totalItems);
var pagedModel = new PagedModel<RelationItemModel>(totalItems, items);
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:05:59 +02:00
return Task.FromResult(pagedModel);
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
}
[Obsolete("Use GetPagedDescendantsInReferencesAsync which returns an Attempt with operation status. Scheduled for removal in Umbraco 19.")]
public Task<PagedModel<RelationItemModel>> GetPagedDescendantsInReferencesAsync(Guid parentKey, long skip, long take, bool filterMustBeIsDependency)
{
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
IEnumerable<RelationItemModel> items = _trackedReferencesRepository.GetPagedDescendantsInReferences(
parentKey,
skip,
take,
filterMustBeIsDependency,
out var totalItems);
var pagedModel = new PagedModel<RelationItemModel>(totalItems, items);
return Task.FromResult(pagedModel);
}
public async Task<Attempt<PagedModel<RelationItemModel>, GetReferencesOperationStatus>> GetPagedDescendantsInReferencesAsync(Guid parentKey, UmbracoObjectTypes objectType, long skip, long take, bool filterMustBeIsDependency)
{
IEntitySlim? entity = _entityService.Get(parentKey, objectType);
if (entity is null)
{
return Attempt.FailWithStatus(GetReferencesOperationStatus.ContentNotFound, new PagedModel<RelationItemModel>());
}
#pragma warning disable CS0618 // Type or member is obsolete (but using whilst it exists to avoid code repetition)
PagedModel<RelationItemModel> pagedModel = await GetPagedDescendantsInReferencesAsync(parentKey, skip, take, filterMustBeIsDependency);
#pragma warning restore CS0618 // Type or member is obsolete
return Attempt.SucceedWithStatus(GetReferencesOperationStatus.Success, pagedModel);
}
public Task<PagedModel<RelationItemModel>> GetPagedItemsWithRelationsAsync(ISet<Guid> keys, long skip, long take, bool filterMustBeIsDependency)
{
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
IEnumerable<RelationItemModel> items = _trackedReferencesRepository.GetPagedItemsWithRelations(keys, skip, take, filterMustBeIsDependency, out var totalItems);
var pagedModel = new PagedModel<RelationItemModel>(totalItems, items);
return Task.FromResult(pagedModel);
}
public async Task<PagedModel<Guid>> GetPagedKeysWithDependentReferencesAsync(ISet<Guid> keys, Guid objectTypeId, long skip, long take)
{
using ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true);
return await _trackedReferencesRepository.GetPagedNodeKeysWithDependantReferencesAsync(keys, objectTypeId, skip, take);
}
Item tracking improvements (#11919) * Adding TrackedReferencesController * Adding/changing views * Adding/Editing js files * RelationService changes * RelationRepository changes * Adding missing translations * Adding/Modifying tests * Beginning of #9125 migration * Introducing a new component + refactoring based on that * Abstracting + refactoring * Work on content unpublishing * Work on media.delete * Various small changes * Beginning of #9119 migration * Changes on content.delete * Various fixes * Adding new keys used in the listview bulk actions * Adding methods to get the items used in relations from array of ids * Adding the checkLinkedItems function to the trackedReferencesResource * Passing the selected items from a listview to unpublish and delete * Adding umb-tracked-references-listview * Adding umb-tracked-references-listview-table with language column * Fixes for tracked references * Changes in listview unpublish dialog * Changes in listview delete dialog * Removing Variants logic as it is not currently supported * Visual fixes * Closing dialogs on click * Fix wording * Fix breaking changes * Change to a single title "Items in use" instead of 2 different for Content and Media * No need for obsoleting because we can change new controllers * Return ActionResult from actions * V9: Prevent delete or unpublish of items that have references (#12047) * Introducing config settings that prevent delete or unpublish of items referenced by other items * Disable deletion of content items and show a new warning * Disable deletion of media items and show a new warning * Disable deletion of list view items * Disable unpublish and bulk unpublish * Add a new warning * V9: Displaying descendants in use as part of item tracking (#12039) * Replace HasReferencesInDescendants with GetPagedDescendantsInReferences * Display descendants in use on parent's info tab * Add getPagedDescendantsInReferences to trackedReferencesResource * Add lang keys for Descendants in use * Refactoring controller actions * Don't call check descendants usage when it is a new item * rename busfy to busy * always show references * rearrange for scrollbar to appear at the edge of the dialog * use the word referenced instead of used * change fallback texts * Added "IsDependency" to relation types * refactor of umb-tracked-references * rename checkLinkedItems to getPagedReferencedItems * rename check to load, to be consistent with the rest. * Refactored backend . Needs frontend fixes * Cleanup * Use filters * Front-end refactor to match refactored end-points * Fixed bug + warning * Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join). * remove comment * hideNoneDependencies including varying text for the configuration * Hack for SqlCE :( * some final adjustments for item tracking ui * Unbreak change Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-03-07 22:46:16 +01:00
}