xwikisas / macro-pdfviewer

0 stars 4 forks source link

User can't see the PDF in another page when "Delegate my view right" is set to true/1/yes #58

Closed ane-gabriela closed 6 months ago

ane-gabriela commented 8 months ago

Issue could be related to the way ticket 49 was fixed

Steps to reproduce:

  1. As Admin edit a page
  2. Click on Insert > Other macros
  3. Search and select PDF Viewer
  4. Click on "Upload a file..." > Upload a PDF file
  5. Click on Submit
  6. Click on Save & View
  7. Access More Actions > Administer Page > Users & Rights > Rights: Page > Users
  8. Deny View right for a simple user
  9. Create a new page as Admin
  10. Click on Insert > Other macros
  11. Search and select PDF Viewer
  12. Under File add the URL of the attachment from the other page ex. "http://localhost:8080/xwiki/bin/download/1/WebHome/titlepages.pdf?rev=1.1"
  13. Under "Delegate my view right" set "true" or "1" or "yes"
  14. Submit then Save & View (Note that the view right is delegated only if the last person that saved the page has had indeed view rights on the page with denied view rights for the simple user)
  15. Access the page with the simple user

Expected results: The simple user can view the PDF in the second page.

Actual results: The user can't see the PDF in the second page. "Error: The file attachment [null] does not exists in document [xwiki:2.WebHome]." appears.

PDF User View

Environment: Windows 11, XWiki 15.10.5 with MySQL 8.3 and Chrome 121, PDF Viewer Macro (Pro) 2.5.3