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

This widget could not be displayed.
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())
#requireResourcesForContext("atl.comments")
&lt;div id="comments-section" class="pageSection group"&gt;

Replace with

#if (!$action.isPrintableVersion() &amp;&amp; $!remoteUser)
#requireResourcesForContext("atl.comments")
&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 ;)

This widget could not be displayed.

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,
John

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

317 views 2 5
Join discussion

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