Skip to content

Commit

Permalink
Unbreak breaking change in #13066 (#13288)
Browse files Browse the repository at this point in the history
(cherry picked from commit e4741b0)
  • Loading branch information
nul800sebastiaan committed Oct 25, 2022
1 parent 8954b7f commit 0258f24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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

0 comments on commit 0258f24

Please sign in to comment.