Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
10.11.9, 16.10.11
-
None
-
Unknown
-
Description
This issue concerns the permanentlyDelete and restore functions of the services.refactoring API that take a batch as a parameter, introduced by XWIKI-15787, and documented in https://extensions.xwiki.org/xwiki/bin/view/Extension/Refactoring%20Module#HRestoreabatchofdeleteddocuments28since29 .
How to reproduce:
- create a page
- delete this page
- from the recycle bin or in the view screen of the deleted page, copy the batch id that corresponds to this page deletion
- in a page, attempt the permanently delete using the following piece of script (in a groovy script):
{{groovy}} def batchid = "<fill in the copied batch id here>" services.refactoring.permanentlyDelete(batchid).join() {{/groovy}} - in another page (or the same), attempt the restore of the batch using the following piece of script (in a groovy script):
{{groovy}} def batchid = "<fill in the copied batch id here>" services.refactoring.restore(batchid).join() {{/groovy}}
Expected result:
- depending on the used script, the batch is permanently deleted or restored
Actual result:
- there is no impact on the pages in the recycle bin (nor permanent deletion nor restore)
- in the logs of the permanentlyDelete or restore jobs (if fetched from the job logs), the following message appears:
The author [null] of this script is not allowed to permanently deleted document [xwiki:Sandbox.Test page to delete()] with id
The author [null] of this script is not allowed to restore document [xwiki:Sandbox.Test page to delete()] with ID [28]
Attachments
Issue Links
- relates to
-
XWIKI-15787 Create a job to delete all from the recycle bin
-
- Closed
-