Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide PDF Export function for group of users using Custom HTML

Elena Oleksenko
Contributor
January 26, 2018

Hello!

I found a method to hide Export to Word function using Custom HTML https://community.atlassian.com/t5/Confluence-questions/Disable-Certain-Tool-Options-for-Anonymous-Users/qaq-p/194521

But when I try to use this method for PDF export it does not work. 

Is there an error in code block below or this is simply impossible - to hide this function in such a way? 

#if ($userAccessor.hasMembership('test-restriction', $helper.action.remoteUser.name))
<style type="text/css">
##action-pdf-page-export {
display:none !important;
}
</style>
#end

 

1 answer

0 votes
Victor Florin Pana
Contributor
January 28, 2018

Hello Elena, 

In the title you said want to hide the PDF export and in the body you talked about Export to Word so I will assume that you would like to stop people from exporting the space no matter what option.

On a space level, you can always remove the users Export permissions, assuming that you have space admin rights. 

Alternatively you can disable exporting on the entire Confluence instance: https://confluence.atlassian.com/confkb/how-to-restrict-the-ability-to-export-a-space-in-confluence-800699946.html

Kind regards,
Victor

Elena Oleksenko
Contributor
January 29, 2018

Hello Victor! 
Thank you for the reply! 

My explanation a bit messy, probably. I meant, I need to hide menu item "Export to PDF" from Tools menu only for one group of users. Users who are not in this particular group should be able to use "Export to PDF" function. 

Victor Florin Pana
Contributor
January 29, 2018

Hello Elena,

If you want specifically to hide it, unfortunately I cannot help you. But if you want just for it to be unusable for members of a group, although it might still be visible, then you can restrict this from the space permissions section. Simply ensure that the specific group, does not have the "Export" permission ticked.

Best regards,
Victor

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events