Hiding Comments in Confluence

Is it possible to hide comments to annoymous users in confluence.

We dont want users who are not logged in to see any comments on any pages.

4 answers

1 accepted

4 votes
Answer accepted
David Simpson Community Champion Nov 06, 2012

You'll need to edit comments.vmd (& perhaps comments.soy) to remove commenting from anonymous users.

Try searching <confluence-install>/confluence/decorators/components/comments.vmd for

#if (!$action.isPrintableVersion())
&lt;div id="comments-section" class="pageSection group"&gt;

Replace with

#if (!$action.isPrintableVersion() &amp;&amp; $!remoteUser)
&lt;div id="comments-section" class="pageSection group"&gt;

I've added && $!remoteUser to the if statement above.

One more thing: You'll have to update this each time you upgrade Confluence. And it's not strictly supported :)

This is brilliant, you are awesome!!

David Simpson Community Champion Nov 08, 2012

Thanks @Brian Mitchell. I always aim for awesome ;)

Hi Brian,

I'm sorry to say that it isn't currently possible to do this using a vanilla install of Confluence but we do have a feature request to ask that we incorporate this kind of fucntionality in a future release of Confluence so I would suggest that you watch/vote/comment on the issue so that our developers are aware of the desire for this functionality.

However, I believe that you might be able to work something out for this using the Customware Visibility plugin and the Hide-From macro to hide page comments from the anonymous user.

All the best,

Would this macro need to placed in every page? as the space we are trying to hide comments from is a help system and is extremly vast.

Would it be possible for some instruction or example on how to apply this macro, i have been having trouble for the past few hours to get the syntax correct.

See https://jira.atlassian.com/browse/CONF-7742- Closed, looks like complex Comment Security logic won't be added to the core product.

See https://jira.atlassian.com/browse/CONF-5639- Open when I wrote this, for a slighly simpler proposal for extra comment security

See https://confluence.atlassian.com/display/CONF35/Viewing+Commentsfor information on how to configure how comments behave on a site. Might not be able to 'hide' them, but I think you can have them collapsed when viewed for the first time.

You can use Talk - Advanced Inline Comments add-on. It provides the capability to set vieweing permissions, on a space level and for specific comments. So with Talk you can hide comments and discussions for anonymous users.

Hope it helps.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 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...

868 views 2 13
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