Delete attachment right

Good evening everyone,

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…

Greetings,
Daniel

Hello,

No, this doesn’t exist as a built-in option. Of course since XWiki is customizable, this could be implemented with some development work.

Our rationale is that if you can add an attachment then you should be able to remove it (imagine you made a mistake).

Also, if you can edit content (and thus delete existing content), then why couldn’t you also delete attachments? What’s the difference?

I’m curious to understand more your use case, to see if there’s something we need to change inside of XWiki.

Thx