How to hide content's author (Created by) for certain users or groups in Confluence
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
目的
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