How do I hide confluence content on a page based on permissions.

I would like to show and hide content on a confluence page based on their group membership.  The visibility plug-in does not seem to be supported anymore.  Any suggestions?

2 answers

1 accepted

1 vote
Answer accepted

Hi Scott,

The visibility plugin seems to be supported in the latest versions of confluence 5.6.x as we can see here. I believe you can still use it for this request smile



Hmm. Thank you. Our IT department is having problems getting the visibility plug-in installed. I guess, we'll have to work out that detail. But I guess it's good to know that it's an option for us.

1 vote
Davin Studer Community Champion Dec 19, 2014

If you truly want the content to be hidden however you need to combine the visibility plugin with the page include plugin. The reason for this is users could just view the source of the page (tools menu -> view source, or if they have edit permissions they could just edit the page and see the information, also the search engine will index the content so they could see it in search. If you truly want it hidden what you need to do is put the content to be hidden on its own page and then give it a viewing restriction to the group or people that view it. Then on another page you would include the hidden content page onto that page and wrap it in the visibility plugin with the save view restrictions that were assigned to the hidden content page. The reason for wrapping the include macro with the visibility macro is to avoid the error that would be shown to users who don't have viewing rights to the hidden content. This is the way to truly make the content hidden.

You made a really good point. The users of the page won't have edit permissions. But I love your approach to use the include plug-in and restrict the content. If only the include plug-in would render nothing if the user doesn't have permission. Or even better, give us the option to either display an error or nothing.

It does show an error message, but preemted with a respective warning, this should work fine.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

238 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you