Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-23842

permanentlyDelete and restore batch APIs from services.refactoring don't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 10.11.9, 16.10.11
    • Refactoring
    • 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

          Activity

            People

              Unassigned Unassigned
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: