No longer shows success message if content moving is cancelled (#15051)
* Fix for issue https://github.com/umbraco/Umbraco-CMS/issues/13923 - Added AttemptMove method to the ContentService - Updated ContentController PostMove method to return ValidationProblem whenever the node is not moved * Align changes with V14 solution. Make it non breaking. --------- Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
This commit is contained in:
@@ -2254,7 +2254,12 @@ public class ContentController : ContentControllerBase
|
||||
return null;
|
||||
}
|
||||
|
||||
_contentService.Move(toMove, move.ParentId, _backofficeSecurityAccessor.BackOfficeSecurity?.GetUserId().Result ?? -1);
|
||||
OperationResult moveResult = _contentService.AttemptMove(toMove, move.ParentId, _backofficeSecurityAccessor.BackOfficeSecurity?.GetUserId().Result ?? -1);
|
||||
|
||||
if (!moveResult.Success)
|
||||
{
|
||||
return ValidationProblem();
|
||||
}
|
||||
|
||||
return Content(toMove.Path, MediaTypeNames.Text.Plain, Encoding.UTF8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user