Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Umbraco.Core/Services/DataTypeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,12 @@ private void ConvertMissingEditorsOfDataTypesToLabels(IEnumerable<IDataType> dat
return OperationResult.Attempt.Succeed(MoveOperationStatusType.Success, evtMsgs);
}

[Obsolete("Use the method which specifies the userId parameter")]
public Attempt<OperationResult<MoveOperationStatusType, IDataType>?> Copy(IDataType copying, int containerId)
{
return Copy(copying, containerId, Constants.Security.SuperUserId);
}

public Attempt<OperationResult<MoveOperationStatusType, IDataType>?> Copy(IDataType copying, int containerId, int userId = Constants.Security.SuperUserId)
{
var evtMsgs = EventMessagesFactory.Get();
Expand Down
5 changes: 4 additions & 1 deletion src/Umbraco.Core/Services/IDataTypeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IDataTypeService : IService
IReadOnlyDictionary<Udi, IEnumerable<string>> GetReferences(int id);

Attempt<OperationResult<OperationResultType, EntityContainer>?> CreateContainer(int parentId, Guid key, string name, int userId = Constants.Security.SuperUserId);

Attempt<OperationResult?> SaveContainer(EntityContainer container, int userId = Constants.Security.SuperUserId);

EntityContainer? GetContainer(int containerId);
Expand Down Expand Up @@ -101,6 +101,9 @@ public interface IDataTypeService : IService

Attempt<OperationResult<MoveOperationStatusType>?> Move(IDataType toMove, int parentId);

[Obsolete("Use the method which specifies the userId parameter")]
Attempt<OperationResult<MoveOperationStatusType, IDataType>?> Copy(IDataType copying, int containerId) => Copy(copying, containerId, Constants.Security.SuperUserId);

/// <summary>
/// Copies the give <see cref="IDataType"/> to a given container
/// We have the default implementation here to avoid breaking changes for the user
Expand Down