I’m using xWiki 14.10.19 and I am also using the default xWiki API in order to get an attachment.
If I am logged into the Wiki, I can see any attachment of any page without any problem.
But I want anyone, without being logged in, to be able to see this attachment, no matter if it is an image, video, audio… Etc
Since I am using this API to be able to send that attachment to another application and that the attachments that the Wiki has, can be visualized in another third party application, that are calling to my API to obtain the attachment of a page.
Is there a way to do this?
I was reading this documentation, I tried it and it didn’t work for me, although I don’t think it satisfies what I intend to do:
The idea is that anyone can “see” the attachments and the user does not have to have an account.
For example, if a user wants to upload an attachment, he/she will have to log in to the Wiki and perform the process.
But, what I want to implement is that any user can see the attachments without logging in. (Only see it, not create it)
I developed an API apart from the xWiki one, in order to obtain the attachments that my Wiki contains, which are only images and videos, so if from that API I want to obtain the attachments, it would look like this:
If any user accesses that URL, can see the content of it, only when logged in. but I need that, without having to log into the Wiki, any user should be able to see the image/video.
Currently, if I try to access that URL, I get the following:
But what I need, is to see the image that has the Wiki, without asking me to log in like this:
Yes, that’s exactly what I mentioned above: you need to give “view” rights to the “Guest” user (ie users who are not logged in). And don’t give “edit” rights to “Guest” (so that only logged in users can edit/create).
Inside my Wiki, I don’t have a “guest” group, only the default ones (xWikiAllGroup, xWikiAdminGroup) and some custom ones, but I don’t need them for this.
How can I assign “view” permissions to a “guest” group?
These are the only configurations I know of to be able to manage the display of pages within the Wiki:
Also, these attachments are supposed to be accessible to anyone, you don’t have to have an account within the Wiki or belong to a Wiki group, the only relevant thing, is that the attachments can always be viewed.
Actually, looking at your screenshot, you have explicitly checked the box “Prevent unregistered users from viewing pages, regardless of the page rights”.
With this setting, it makes sense that attachments are not accessible for guests on your instance.