This issue has been created
There are 2 updates, 1 comment.
 
 
Book Versions / cid:jira-generated-image-avatar-0b6eaa34-c0e2-478a-a9fd-a78a4cf1e387 BVERSION-210 Open

Mark page as deleted doesn't work for non-admin users

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-84525031-31bd-4d6b-9c4f-d5f4b8edf992 Anca Luca created this issue on 14/Apr/25 19:52
 
Summary: Mark page as deleted doesn't work for non-admin (?) users
Issue Type: cid:jira-generated-image-avatar-0b6eaa34-c0e2-478a-a9fd-a78a4cf1e387 Bug
Affects Versions: 1.12
Assignee: Unassigned
Attachments: image-2025-04-14-19-52-09-949.png
Components: Base feature
Created: 14/Apr/25 19:52
Priority: cid:jira-generated-image-static-major-cb96d55d-079a-4517-98ba-78a4d0d346de Major
Reporter: Anca Luca
Description:

How to reproduce:

  • On a page from the book
  • connect with a regular user that has edit rights on the book
  • from the versions menu, choose "Mark as deleted"
    _thumb_43562.png

Expected result:

  • the page is reloaded and a visual confirmation that the page is marked for deletion is displayed

Actual result:

  • the page is reloaded but nothing happens
 
 

2 updates

 
cid:jira-generated-image-avatar-84525031-31bd-4d6b-9c4f-d5f4b8edf992 Changes by Anca Luca on 14/Apr/25 19:53
 
Summary: Mark page as deleted doesn't work for non-admin (?) users
Description: How to reproduce:
* On a page from the book
* connect with a regular user that has edit rights on the book
* from the versions menu, choose "Mark as deleted"
!image-2025-04-14-19-52-09-949.png|thumbnail!

Expected result:
* the page is reloaded and a visual confirmation that the page is marked for deletion is displayed

Actual result:
* the page is reloaded but nothing happens

From what I tested, if one connects with and admin user this works (at least with a superadmin it works).
 
 

1 comment

 
cid:jira-generated-image-avatar-84525031-31bd-4d6b-9c4f-d5f4b8edf992 Anca Luca on 14/Apr/25 19:57
 

From what I could investigate, the issue is related to the verification in here https://github.com/xwiki-contrib/book-versions/blame/023b7af3f7eaad35d2adc0909886aaf02b83500b/application-book-versions-ui/src/main/resources/BookVersions/Code/SwitchDeletedMark.xml#L49 , that checks rights on an (undefined) $bookReference, which yields true for an admin and false for a non-admin.