How to hide the People Directory from a Confluence group
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
Purpose
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.
Solution
- If you are using the Default Confluence Theme:
- Go to Confluence Admin >> Layout >> Main Layout >> Edit
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
- If you are using the Documentation Theme:
- Shutdown your Confluence
- Go to
<CONF-INSTALL>/confluence/WEB-INF/atlassian-bundled-plugins
- Make a backup of the doctheme-x.x.x.jar.
- Create a new temporary folder.
- Extract the doctheme-x.x.x.jar into the temporary folder.
You can use common archiving tools, such as WinRAR or via the command line, to extract the jar
- Open the main.vmd file with from the following directory
<TEMPORARY_FOLDER>/doctheme/decorators/
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
Open the doctheme-x.x.x.jar with archiving tools such as winrar or winzip
Add the main.vmd into the doctheme-x.x.x.jar to the path
/doctheme/decorators/
- Replace the old jar in the
<CONF-INSTALL>/confluence/WEB-INF/atlassian-bundled-plugins
with the modified doctheme-x.x.x.jar - Restart Confluence.