How to hide content's author (Created by) for certain users or groups in Confluence

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

Content's author (Created by) on top of a page or blog can be hidden entirely using Stylesheet by referring to (Archived) How to hide content author name (created by) in a page.

This KB is to hide it from specific groups such as anonymous users but still have it available for the rest of the users by Customizing Site and Space Layouts. This means the customization below can also be applied separately only to some specific space.

How to hide content's author name (Created by) for Anonymous users

  1. Navigate to Confluence Administration page >> Layouts.
  2. Look for Page Layout under the Content Layouts and click on Create custom next to it. (For Blogs, use News Post Layout or Blog Post layout(in older versions))
  3. Look for the line below:

    Original
            #parse ("/decorators/includes/page-metadata.vm")
  4. Add the conditions on top and below of the line, like this:

    Change To
    ## Custom -- Hide "Created by" to anonymous users
            #if ($action.authenticatedUser)
            #parse ("/decorators/includes/page-metadata.vm")
            #end
  5. Scroll to the bottom and click Save

How to hide content's author name (Created by) for users that are not members of confluence-admin group

  1. Navigate to Confluence Administration page >> Layouts.
  2. Look for Page Layout under the Content Layouts and click on Create custom next to it. (For Blogs, use News Post Layout or Blog Post layout(in older versions))
  3. Look for the line below:

    Original
            #parse ("/decorators/includes/page-metadata.vm")
  4. Add the conditions on top and below of the line, like this:

    Change To
    ## Custom -- Hide "Created by" to users that are not members of confluence-admin group
            #if ($userAccessor.hasMembership('confluence-administrators', $helper.action.remoteUser.name))
            #parse ("/decorators/includes/page-metadata.vm")
            #end
  5. Scroll to the bottom and click Save

Last modified on Jun 3, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.