Hiding Comments in Confluence

Deleted user November 6, 2012

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.

5 answers

1 accepted

5 votes
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 6, 2012

Confluence Server:

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")
<div id="comments-section" class="pageSection group">

Replace with

#if (!$action.isPrintableVersion() && $!remoteUser)
#requireResourcesForContext("atl.comments")
<div id="comments-section" class="pageSection group">

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 :)

 

Confluence Cloud:

You cannot do this. Sorry.

 

Deleted user November 7, 2012

This is brilliant, you are awesome!!

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 8, 2012

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

1 vote
JohnA
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.
November 6, 2012

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

Deleted user November 6, 2012

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.

Deleted user November 6, 2012

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.

0 votes
Monique Khairuliana
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2019

Hi Everyone,

We can use JavaScript to hide comments section for anonymous users:

How to hide Page Tools and Comments section for Anonymous Users in Confluence?

Mike Standal June 5, 2019

Hello. How would a cloud account access these pages to incorporate the solution you link to here? I have gone through every admin page for our cloud account and cannot find this.

Thanks

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 5, 2019

You cannot do this on Confluence Cloud. Sorry.

Also, this method, using Javascript to hide things from anonymous users isn't a very security conscious way of hiding things. They can should be prevented from rendering in the first place.

0 votes
Kate _izi_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 2, 2017

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.

0 votes
James Rickards May 1, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events