Details
-
Bug
-
Resolution: Fixed
-
Critical
-
10.10-rc-1, 10.8.2, 9.11.9
-
Unit
-
Easy
-
N/A
-
N/A
-
Description
For example, the following
{{velocity}}
#set ($batchId = "5cfabdc7-ecdd-49f3-90ba-a3fce03e0de2")
$services.refactoring.restore($batchId)
{{/velocity}}
produces the error
The author [null] of this script is not allowed to restore document [xwiki:Level1.WebHome()] with ID [11]
The request is initialized with the current user, but not the author. When you don't have programming right, #execute() will reset the right, bit this time it does set the author (and fix the request).
Same problem with the other #restore API and might be true with other methods of RefactoringScriptService.