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

ScottW December 19, 2014

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
Rodrigo Girardi Adami
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 19, 2014

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

Cheers,

Rodrigo

ScottW December 19, 2014

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 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.

ScottW December 19, 2014

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.

Felix Kaiser May 17, 2018

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
TAGS
AUG Leaders

Atlassian Community Events