I would like to ask if there is an option to change the permission to delete attachments from “Edit” to “Delete”.
We use XWiki version 15.10.13, and we want to allow our users to add or update attachments but not delete them. It also wouldn’t be necessary if the attachment history of a file (saved in the DB) was not lost after an attachment is deleted and added again with the same name, but that’s just the way it is.
I have looked at the XWiki.AttachmentSelector-Page and seen a condition that sets the delete action if the context right is ‘edit’, but changing this to ‘delete’ has no effect on the attachment tab at the bottom of every XWiki page.
Thanks in advance for any tips on how to prevent our users from deleting those attachments…
Hi, I’m very sorry for the late response. I was feeling a bit stressed and in a hurry, and I forgot to reply. Our goal is to ensure that none of the uploaded attachment versions are lost. If you don’t update it - may as a new user - but delete an attachment and upload it with the same name, it will just be version 1.1.
I’m just a little bit worried. I think that we might lose some old revisions because it looks like there’s a bug or something I can’t really explain: If I upload an attachment to a page using the ‘Upload’ button in the ‘Attachment’ section, the version will be 1.1. If I then update this file, the version number will increase by one (1.2) and another time (1.3). When I then try to access rev1.1, it is no longer available, but rev1.2 and 1.3 are. It’s not found in the recyclebin, too and I couldn’t locate it in the database table (XWIKIATTACHMENT_ARCHIVE). There are just those version 1.2 and 1.3…
Attachment versioning is enabled and stored in our Oracle database (hibernate). It seems that this could be a bug in version 15.10.13 (Windows), but I couldn’t find any information confirming this. May I have to create a test instance and check if a newer version will fix this.