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

  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

最終更新日 2021 年 6 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.