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