How to hide content's author (Created by) for certain users or groups in Confluence
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
- Navigate to Confluence Administration page >> Layouts.
- 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))
Look for the line below:
Original#parse ("/decorators/includes/page-metadata.vm")
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
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
- Navigate to Confluence Administration page >> Layouts.
- 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))
Look for the line below:
Original#parse ("/decorators/includes/page-metadata.vm")
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
Scroll to the bottom and click Save