Skip to content
Snippets Groups Projects
Commit 1c22a364 authored by Eduard Moraru's avatar Eduard Moraru
Browse files

XWIKI-13688: Unable to delete/rename/move a copied document as a normal user

- Resetting the creation date and setting the creator/lastAuthor as the current user.

(cherry picked from commit 22af3c87)
parent ab87c02f
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ public boolean copy(DocumentReference source, DocumentReference destination)
try {
String language = source.getLocale() != null ? source.getLocale().toString() : null;
boolean result =
xcontext.getWiki().copyDocument(source, destination, language, false, true, false, xcontext);
xcontext.getWiki().copyDocument(source, destination, language, false, true, true, xcontext);
if (result) {
this.logger.info("Document [{}] has been copied to [{}].", source, destination);
} else {
......
......@@ -88,7 +88,7 @@ public void copy() throws Exception
DocumentReference sourceReference = new DocumentReference("wiki", "Space", "Page", Locale.FRENCH);
DocumentReference copyReference = new DocumentReference("wiki", "Space", "Copy");
when(this.xcontext.getWiki().copyDocument(sourceReference, copyReference, "fr", false, true, false,
when(this.xcontext.getWiki().copyDocument(sourceReference, copyReference, "fr", false, true, true,
this.xcontext)).thenReturn(true);
assertTrue(this.mocker.getComponentUnderTest().copy(sourceReference, copyReference));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment