Is there a way to disable in-line Comments on Wiki pages?

We need the ability to disable the in-line Comments "feature" in Confluence for signed-off, approved documents that are used for compliance.  People are messing with the docs themselves, and this is deadly for official procedures that are in daily use.  This "feature" should be locked out when the doc is restricted to certain editors!!  Those with read-only access should be restricted to making comments in the Comments field at the bottom of the wiki page and not be allowed to make in-line Comments of this sort.  It confuses and counfounds the Operations people using the Procedures, and renders the doc NOT IN COMPLIANCE when auditors come calling.  This is a serious liability.

1 answer

2 votes
Stephen Deutsch Community Champion May 12, 2016

Here is a user macro which you can use to prevent those with read-only access from making inline comments:

## @noparams
#if(!$permissionHelper.canEdit($userAccessor.getUserIfAvailable($req.remoteUser),$content))
<style> button[data-key*=inline-comment] { visibility:hidden; } </style>
#end

You can make sure it gets put on every page by saving it as a user macro and including a reference to the macro in wiki markup format (i.e. {mymacro}) in either the header or footer textbox in the Header, Footer, Sidebar part of the Look and Feel section in the Space options (for one space) or the global options (for all spaces).

Hi Stephen,

thank you for this trick.
Unfortunately this will leave you will some empty space in the bubble:

image2017-1-17 15:27:47.png

If you are changing your code to display:none it should look normal:

## @noparams
#if(!$permissionHelper.canEdit($userAccessor.getUserIfAvailable($req.remoteUser),$content))
<style> button[data-key*=inline-comment] { display:none !important;} </style>
#end

We are currently using just the inner part <style>...</style> in the Confluence user defined CSS-Section.

This will disallow creating new comments all together, as we have just migrated to Talk.

Best regards,
Tobias

 

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 4 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, ...

56 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