Attachments are shown at upper tree/page index/ search even after hiding them from look & feel / presentation setting

Attachments are shown at on upper tree/page index/ search even after hiding them from look & feel / presentation setting

Unable to hide attachments in xwiki
steps to perform hidden activity
1.) go to administrator setting
2.) Select look & feel
3.) select presentation
4.) select no to attachments

but even after selecting this setting attachments are shown at upper tree structure and in searches and in page indexing
user will directly click and download that attachment which is we already prevented

kindly help to resolve this issue .

The setting you configured is to hide the attachment tab at the bottom of pages, not elsewhere.

then how can i prevent the same from everywhere ?

We don’t have a setting to hide attachments everywhere in the UI.

By “upper tree structure” you mean the breadcrumb right?

What’s your use case? Why do you want to hide all attachments? (curious about the use case). Thx

yes that one

we need to upload some stuff but limited to read only rights.so that we can prevent the misuse of the stuff.

Then you could simply put some view permissions on the related pages and their attachments won’t be seen except by those who have permissions.

I have put that setting but attachments are shown at different places like 1 page index page , 2 searching 3 breadcrumb.

i need to prevent this from unregistered users . and need to show the page but not attachments

That’s not possible. You can show both page content + attachment or none of them.

That’s easy, you just need to tick the view right for XWikiAllGroup and everyone else (ie unreg users) will not have view rights for the pages on which you put the rights.

It means we can not do anything in the available version , But can we modify the code for the same if required.

Everything is possible in XWiki :wink: It’s actually a dev platform!

What do you do is the page displays the attachments? Does it display an error?

So in short you want to implement a new custom right (something possible in XWiki). And then check it at various places in the XWiki UI and in the XWiki code.

You need to list all the places that you need to modify (ie where you wish to check if the user should see the attachment or not).

I’ll give you one example: imagine you’d like to not show attachments in the breadcrumb depending on some condition. You’d need to:

1 Like