Hide comments for anonymous users

Is it possible to hide the comments on a page for anonymous users and/or other groups in Confluence? Or only show comments to certain groups?

4 answers

Adding comments is a permission but every page viewer is allowed to view the comments, too. You have two possibilties. Change the velocity code in your theme or develop a plugin.

I was afraid of that :-(


You can set security on comments : https://confluence.atlassian.com/display/JIRA/Commenting+on+an+Issue

In the Add comment part you can read how to set security on a comment.

Best regards,


Yes in JIRA, but not in Confluence

Oops, my mistake, I'll delete this answer.

0 vote

Hi Almar,

in order to hide comments for the anonymous users you can add the following javascript to your announcement banner in JIRA

jQuery().ready(function() {

Hello Fabio,


will this hide all comments for all projects for anonymous users? How would it be possible to hide comments for some particular projects?

Thanks for your help!


yes, it will hide comments for all projects. In order to hide comments just for specific projects you shoud add a check based on the URL (it contains project key).

jQuery().ready(function() {
var url = window.location.href;
if(jQuery(".login-link").size()>0 && url.includes("YOUR_PROJECT_KEY_HERE")){

Hope it helps,


Talk addon provides permissions for public spaces:


You could have private comments for your team.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Goff-Dupont
Published 3 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

38 views 2 3
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