There are 7 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-7966c6e7-7290-427f-bd97-7c09e50a0d5e XWIKI-23648 Open

Impossible to use RefactoringScriptService#restore(String batchId) directly if the author has programming right

 
View issue   ยท   Add comment
 

7 updates

 
cid:jira-generated-image-avatar-d3487dcb-540a-4ac7-89fa-b15f7080cfc9 Changes by Thomas Mortagne on 30/Oct/25 18:47
 
Summary: Impossible to use RefactoringScriptService#restore(String batchId) directly if you have the author has programming right
Version: 9.11.9
Version: 16.10.11
Version: 10.10-rc-1
Version: 10.8.2
Description: For example , the following

{code}
{{velocity}}
#set ($batchId = "5cfabdc7-ecdd-49f3-90ba-a3fce03e0de2")
$services.refactoring.restore($batchId)
{{/velocity}}
{code}

produces the error

{code}
The author [null] of this script is not allowed to restore document [xwiki:Level1.WebHome()] with ID [11]
{code}


Same problem with the other #restore API and might be true with other methods of RefactoringScriptService.

The request is created with the current user, but not the author.
Labels: regression