Forums

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

How to hide export to pdf if user does not have space export permission in confluence

Crs co November 21, 2018

Hi,

I want to limit the access of exporting for some of the Users which for example does not have space export access,

I know that I can disable it from plugin setting or I can hide it by writing java-script in header of the page, but in the second method, I need to limit it just for some user, for example leaders needs to have access for exporting but some others not,

how can I add scripts in header to check if the user has space export permission can see the export to PDF item.

thank you so much.

2 answers

1 accepted

1 vote
Answer accepted
Crs co November 24, 2018

Hello,

I added the below codes in Space layout and it works.

#if ($permissionHelper.canExport($authenticatedUser, $action.page))
<script type="text/javascript">
AJS.$('#action-export-pdf-link').hide();
</script>
#else 
#end
0 votes
kennyngkk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2018

Hey There, 

 

We actually have an article for this. Please refer to it below. 

Crs co November 23, 2018

Dear @kennyngkk,

thank you for your answer, actually solution in your link will disable Export for all the users, I need to write a script to check if someone has xxx permission see the export item and for who does not have xxx permission hide the item, we need exporting for some users and dont want to disable it, just want to hide it based on space permissions

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events