From e4741b0c647b29e33fe4b2bd803107934f707e4f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 25 Oct 2022 14:18:50 +0200 Subject: [PATCH] Unbreak breaking change in #13066 (#13288) --- src/Umbraco.Core/Services/DataTypeService.cs | 6 ++++++ src/Umbraco.Core/Services/IDataTypeService.cs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/DataTypeService.cs b/src/Umbraco.Core/Services/DataTypeService.cs index a8a9e1fd3b..4fd698236a 100644 --- a/src/Umbraco.Core/Services/DataTypeService.cs +++ b/src/Umbraco.Core/Services/DataTypeService.cs @@ -442,6 +442,12 @@ namespace Umbraco.Cms.Core.Services.Implement return OperationResult.Attempt.Succeed(MoveOperationStatusType.Success, evtMsgs); } + [Obsolete("Use the method which specifies the userId parameter")] + public Attempt?> Copy(IDataType copying, int containerId) + { + return Copy(copying, containerId, Constants.Security.SuperUserId); + } + public Attempt?> Copy(IDataType copying, int containerId, int userId = Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); diff --git a/src/Umbraco.Core/Services/IDataTypeService.cs b/src/Umbraco.Core/Services/IDataTypeService.cs index 11fa1fc964..035c7e8a7b 100644 --- a/src/Umbraco.Core/Services/IDataTypeService.cs +++ b/src/Umbraco.Core/Services/IDataTypeService.cs @@ -16,7 +16,7 @@ public interface IDataTypeService : IService IReadOnlyDictionary> GetReferences(int id); Attempt?> CreateContainer(int parentId, Guid key, string name, int userId = Constants.Security.SuperUserId); - + Attempt SaveContainer(EntityContainer container, int userId = Constants.Security.SuperUserId); EntityContainer? GetContainer(int containerId); @@ -101,6 +101,9 @@ public interface IDataTypeService : IService Attempt?> Move(IDataType toMove, int parentId); + [Obsolete("Use the method which specifies the userId parameter")] + Attempt?> Copy(IDataType copying, int containerId) => Copy(copying, containerId, Constants.Security.SuperUserId); + /// /// Copies the give to a given container /// We have the default implementation here to avoid breaking changes for the user