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>
This commit is contained in:
Andy Butland
2025-04-01 15:49:49 +02:00
committed by GitHub
parent bf89eae07f
commit 8e0912cbf1
11 changed files with 343 additions and 289 deletions

View File

@@ -0,0 +1,12 @@
namespace Umbraco.Cms.Core.Models;
/// <summary>
/// Definition of relation directions used as a filter when requesting if a given item has relations.
/// </summary>
[Flags]
public enum RelationDirectionFilter
{
Parent = 1,
Child = 2,
Any = Parent | Child
}