How to hide the People Directory from a Confluence group

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

目的

Confluence does not have a built in way to hide the People Directory from a group. You might not want their staff information (position, email, etc) to be visible to all Confluence users, for example in a publicly accessible instance of Confluence.

ソリューション

  1. If you are using the Default Confluence Theme:
    1. Go to Confluence Admin > Layouts 
    2. In Site Layouts section, click on Create custom link for Main Layout
      1. If the layout was edited preivously, you will see a Edit link instead. 
    3. Add the code below before the </head> tag. Replace the <group_name> in the code with the name of the group that you which you want to to hide the people directory from.

      #if ($userAccessor.hasMembership('<group_name>', $helper.action.remoteUser.name))
      <style type="text/css">
      #people-directory-link
      {
      display:none !important;
      }
      </style>
      #end
      
  2. If you are using the Documentation Theme:
    1. Shutdown your Confluence
    2. <CONF-INSTALL>/confluence/WEB-INF/atlassian-bundled-plugins に移動します。
    3. Make a backup of the doctheme-x.x.x.jar.
    4. Create a new temporary folder.
    5. Extract the doctheme-x.x.x.jar into the temporary folder. 
      • (info) You can use common archiving tools, such as WinRAR or via the command line, to extract the jar
    6. Open the main.vmd file with from the following directory <TEMPORARY_FOLDER>/doctheme/decorators/
    7. Add the following code before the </head> tag in the file. Replace the <group_name> in the code with the name of the group which you want to to hide the people directory from. 

      #if ($userAccessor.hasMembership('<group_name>', $helper.action.remoteUser.name))
      <style type="text/css">
      #people-directory-link
      {
      display:none !important;
      }
      </style>
      #end
    8. Open the doctheme-x.x.x.jar with archiving tools such as winrar or winzip 

    9. Add the main.vmd into the doctheme-x.x.x.jar to the path /doctheme/decorators/

    10. Replace the old jar in the <CONF-INSTALL>/confluence/WEB-INF/atlassian-bundled-plugins with the modified doctheme-x.x.x.jar
    11. Confluence を再起動します。

最終更新日 2023 年 7 月 31 日

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

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